A symbol looks like a variable symbols
name, but it’s prefixed with a colon. Examples of symbols include :action,
:line_items, and :id. You can think of symbols as string literals that are
magically made into constants. Alternatively, you can consider the colon
to mean “thing named” so :id is “the thing named id.”
本文介绍了编程中符号的概念及其用法。符号类似于变量名但前缀有冒号,如 :id,可以理解为字符串常量或是被标记为‘名为’的实体。例如 :id 即‘名为 id 的事物’。
144

被折叠的 条评论
为什么被折叠?



