Hacker News new | ask | show | jobs
by tptacek 5470 days ago
Just looking at the syntax and thinking about how I would write things in it, this looks strictly inferior to Haml; there's syntax in here that appears to exist solely to shoehorn this into Coffeescript's grammar. What does this do better than Haml to make up for that?
3 comments

It uses CoffeeScript's grammar, so there's no need to learn a new one or switch between two different grammars as you work.

It's also way less code than Haml. CoffeeKup's src folder is 240 lines of code.

I think the main advantage is it doesn't require Haml. I use Haml whenever possible, but I could see this being very useful for Node.js or other JS/CS-based apps.
why couldn't one write a haml parser for node.js? That would seem like a better strategy than invent a whole new syntax for markup.
There is a HAML parser. http://howtonode.org/haml-for-javascript

But it is a good thing to experiment with different approaches.

Not sure what you mean here-- it's raw CoffeeScript syntax. The templates it produces are JavaScript functions.