>You know, Lisp's syntax is weird but it is exactly this what makes it so flexible. It's easy to manipulate code as data, because the syntax is very regular. Try to do that with C's syntax...
Why you'd "manipulated code as data"? To write macros? A good template system can help with that (if you need it) without homoiconicity.
For me, the level of manipulation of "code as data" (and vice versa) you get with JSON/JS is enough for a lot of use cases.
To write DSLs? You cannot use JSON to create new syntax for your language. The whole idea of DSLs is to extend the language for the problem at hand. How would you do that with JSON? Say... how would you write something like CLOS, for instance, using the alternative mentioned by you?
Maybe your option is good enough for a lot of use cases. But what when it is not good enough? Then you're stuck and there's nothing you can do except waiting for the language desingers to release a new version of your language with, hopefully, the changes you need.
>To write DSLs? You cannot use JSON to create new syntax for your language. The whole idea of DSLs is to extend the language for the problem at hand.
I'm not that sold on DSLs. I have a language (the base language) that people know, has certain semantics, etc.
Now I suddenly go on and add a new mini-language on top of it, with my ad-hoc semantics for the "problem domain"? Why multiply the languages used, so that someone would have to reason and understand both, instead of just one?
I could just use the functionality of the base language, AND it's syntax/semantics, to model the problem. I.e with objects in an OO design, with functions, in a procedural design, data and first class function in a functional design etc.
I don't really like all those Ruby DSLs for example, like for testing, were you have to learn each one ON TOP or knowing the core language.
Why you'd "manipulated code as data"? To write macros? A good template system can help with that (if you need it) without homoiconicity.
For me, the level of manipulation of "code as data" (and vice versa) you get with JSON/JS is enough for a lot of use cases.