3 ms·
Could you reference examples of this assertion please?
by davidann 11y ago
Could you reference examples of this assertion please?
- kyllo 11y agoI think the biggest reason would be Clojure's macro system. The code itself is an abstract syntax tree that you can rewrite in arbitrary fashion at macro expansion time. There's a good example here of how Clojure's macros are more powerful/expressive than Ruby's instance_eval and class_eval: http://daveyarwood.github.io/2014/07/09/whys-guide-to-ruby-in-clojure-part-5/ http://daveyarwood.github.io/2014/07/09/whys-guide-to-ruby-i... And here's an attempt to objectively rank programming languages by expressiveness, measured as lines of code changed per commit: http://redmonk.com/dberkholz/2013/03/25/programming-languages-ranked-by-expressiveness/ http://redmonk.com/dberkholz/2013/03/25/programming-language...
- akmiller 11y agoNot sure what examples the author was thinking of but functional lisps tend to be extremely expressive just because of their nature. If there is expressiveness you are missing the language can be molded in ways that are simply not possible in non-homoiconic languages.
- davexunit 11y agoEasy. Ruby doesn't support syntactic abstraction via macros. No, 'eval' doesn't count.
- danneu 11y agoI think it's pretty uncontroversial to suggest that Clojure is more expressive than Ruby - without even getting into macros. Just take run of the mill Ruby code and convert it to Clojure. Especially anything that looks like functional programming.