3 ms·
Regarding 1: Yes, that's not perfect. But in HAML you have to mark the beginnings of your lines with %, - or = and such, so that's the tradeoff. 2: That's just
by mntmn 14y ago
Regarding 1: Yes, that's not perfect. But in HAML you have to mark the beginnings of your lines with %, - or = and such, so that's the tradeoff.
2: That's just a feature of CoffeeScript.
3: It is pure CoffeeScript. And I agree, it's the same as 1. But the example is also a little odd. a href:'/', 'Home' should work fine.
4: Well, a matter of taste. There is the "semantic html" crowd who try to map the classes of the "div" crowd to more diversified html5 tags, e.g. "section header ul li span" instead of "div div div div" with different classes. I tend to mix both approaches. HAML has the . syntax for the div-inclined, which is nice.
5: No such problems here. But you have to deal with all the arrows ;)
- mntmn 14y agoAfter digging through the discussion and links and this comparison, and if I had to choose something for a new project today, I might take a really serious look at Jade, though. No arrows, no percents, and very thorough discussion of the features (and the compiled output) on its github page.
- pbiggar 14y ago1. I quite like "%" - it nicely marks tags as what they are (and its at the start of the line, not the end). Then there's '.', '-' and '=', which have different semantics so you always know what you're looking at. Its much worse at the end of the line, and 2 chars is unpleasant :) 3. I guess its a part of coffee I steer clear of (and a part of ruby I avoid). Once you have 2 or 3 names in a row, its awkward to decode the function call ordering, so I just avoid it. Actually, I think that that's what I don't like about this. In haml, its a declarative syntax, and that's very restrictive (in a good way). In coffeekup, its pure coffeescript, which means you have imperative semantics that can do anything, and so need to be decoded. But maybe its not a problem in real-life, but if that example is indicative, I'm happy where I am.