|
|
|
|
|
by hajile
1531 days ago
|
|
JS symbols are the opposite of what you are saying. If you have five instances of `:foo` in Ruby, you can guarantee they will be IDENTICAL. If you have five instances of `Symbol('foo')` in Javascript, you are guaranteed they will be completely DIFFERENT. JS symbols are like Common Lisp's `gensym` which it uses to guarantee macro variables won't collide with existing variable names. |
|