|
|
|
|
|
by mikemaccana
5470 days ago
|
|
I love CoffeeScript but I don't understand this. HTML / HAML / SHPAML are document languages. CoffeeScript is a programming language. An element that contains another element isn't a function. I don't see any reason to make it one. If you want a templating language, why not use one, rather than having an unnecessary 'space dash greater than' to indicate elements are contained within each other? |
|
Element A containing Element B can be generated by function A taking Element B.
The CoffeScript program converts a set syntax/grammar into JavaScript; but the syntax is just syntax, and its clean, smart design lends itself well for compiling code other than JavaScript, just as JSON is a useful serialization format in other langs. There are benefits in using the same syntax for representing structure, content, and presentation, as long as the concerns are still properly separated.