3 ms·
Python has logic programming (Pyke). But, in principle, yes: you can't add new syntax to non-homoiconic languages. You can use macros (even C has macros), but t
by xaa 14y ago
Python has logic programming (Pyke). But, in principle, yes: you can't add new syntax to non-homoiconic languages. You can use macros (even C has macros), but they are more limited in a nonhomoiconic language.
In my experience, though, metaprogramming is of limited use as anything other than syntactic sugar. And it often leads to very confusing code.
Other language features are far more fundamental and important: libraries, good integration with the shell, coherent error messages (!), readability, tooling, deployment, etc. As a language Clojure is beautiful, but as an ecosystem it has very far to go.
- swannodette 14y agoI'm not aware of many non-Lisp non-Prolog logic programming libraries like core.logic. core.logic can trivially operate on the terms of language which it is defined in. Meaning core.logic itself can be used for metaprogramming. In my experience, metaprogramming is a wonderfully powerful utility for controlling complexity and confusion. As far as the ecosystem - I used Python for a couple years, it's good. But the Clojure ecosystem is doing pretty darn well itself these days.