3 ms·
How does this article not mention LISP? Ruby has symbols because it was inspired by LISP which had symbols.
by charcircuit 5y ago
How does this article not mention LISP? Ruby has symbols because it was inspired by LISP which had symbols.
- klibertp 5y agoNo, Ruby has symbols because it was inspired by Smalltalk which has symbols. Of course, Lisp also has symbols, and it was one of the inspirations for Ruby (and Smalltalk), but the idea of representing message sends (ie. method calls) as symbol + arguments comes from Smalltalk.
- dmurray 5y agoIt's not a historical article tracing the lineage of the feature. Ruby took some things the designer liked from Lisp, from Smalltalk, from Perl, from other places. He liked symbols because they're good for performance (and compile-time correctness) at a low cognitive cost, and that's why Ruby has symbols.