struct Symbol

Overview

A symbol is a constant that is identified by a name without you having to give it a numeric value.

:hello
:welcome
:"123"
:"symbol with spaces"

Internally a symbol is represented as an Int32, so it's very efficient.

You can't dynamically create symbols. When you compile your program, each symbol gets assigned a unique number.

Included Modules

Defined in:

to_con.cr

Instance Method Summary

Instance methods inherited from struct Value

==(other : CON::Any) ==

Instance methods inherited from class Object

===(other : CON::Any) ===, from_con(con : String | IO) from_con, to_con(io : IO)
to_con
to_con
, to_pretty_con(indent : String = " ")
to_pretty_con(io : IO, indent : String = " ")
to_pretty_con

Instance Method Detail

def to_con(con : CON::Builder) #

[View source]