Comment

Comment by lispm

Symbols in ES6 are much like symbols in Lisp. Basically much where Lisp software uses symbols applies to ES6.

The main difference: Lisp has simple printed representations for interned, uninterned and keyword symbols.

    CL-USER 23 > (let ((color-interned-symbols   '  (yellow   green   red))
                       (color-uninterned-symbols '(#:yellow #:green #:red))
                       (color-keyword-symbols    '( :yellow  :green  :red)))
                   (list color-interned-symbols
                         color-uninterned-symbols
                         color-keyword-symbols))
    ((YELLOW GREEN RED) (#:YELLOW #:GREEN #:RED) (:YELLOW :GREEN :RED))
Lisp also has packages for namespaces of symbols.

Here you can learn more about computing with symbols, in Lisp:

https://www.cs.cmu.edu/~dst/LispBook/

parent lispm 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton