3 ms·
> much more readable. I think this is more of a side-effect of familiarity rather than any inherent differences in readability between the two forms. Lisps do
by lewisl9029 11y ago
> much more readable.
I think this is more of a side-effect of familiarity rather than any inherent differences in readability between the two forms.
Lisps do tend to look foreign to most people because their first languages usually have C-like syntax, and Lisp vs C is a much more dramatic difference than say Python vs C.
Being able to write code that also happens to be valid data structures has some very tangible benefits though.
For instance, in the HTML example, you can replace the strings or keywords in it with variables and it will be evaluated and output into the final HTML. You can also take that HTML element, pass it into any number of map, filter, reduce functions and programmatically transform it in literally any way you want.
This means when you write HTML this way, you can use ClojureScript as your template language, and I think it's safe to say that ClojureScript is a much more powerful and well-designed language than any template language out there designed for HTML.