![]() About SymbolsThis note is called:
[SYMBOLS] The [data-type] [symbol] is usually found in non-LISP like programming language (Ruby has a type called Symbol but its behavior and rational are different the LISP-like symbols). [symbol]s are useful because they have PARTS that are immutable (like their 'name') and parts that are mutable (like 'value' and 'plist'). [symbl]s are created from [string]s using the operator 'intern'. In its simplest form 'intern' takes a [string] and returns a [symbol]. (intern [string]) ==> [symbol] constructor Unlike many constructors of things with mutable parts 'inter is functional. That is (implies (equal s1 s2) (equal (inter s1) (intern s2)) Aside ------------------------------------------------------------------------------- The [plist} ( < [alsit]) of a [symbol] may have different [representation]s The usual [representation] foe [plist]s used by IBUKI it the default [representation] for [alist]s The existence of both immutable and mutable attributes of [symbol]s is their secret sause. |