4 ms·
Because none of these points are valid: * Readability * Portability * Assists with avoiding common errors in formatting * Generally easy to learn, with thin
by 1qaz2wsx3edc 14y ago
Because none of these points are valid:
* Readability
* Portability
* Assists with avoiding common errors in formatting
* Generally easy to learn, with thin abstraction layers
* Enforce DOM hierarchy with formatting
- spankalee 14y agoThanks for the sarcasm, but I'm not sure your points stand. * Readability can be somewhat subjective. Neither Coffekup or any of the markup DSLs I've seen are inarguably much more readable than HTML. A few extra braces to closing tags do not immediately make something less readable to me, and the example given does not seem like a clean win to me. Better in some cases, worse in others, a wash overall. * I do not think "portability" means what you think it does. Coffeekup appears to only run under Coffeescript. That makes it rather un-portable. Many other template languages have multiple implementations in many languages. That seems unlikely with Coffeekup. * Reducing formatting errors would presumably be because of static syntax errors caught by a Coffeescript-aware editor, and dynamic errors caught by the Coffeescript compiler and JS runtime. The same is achieved with a HTML-aware editor and various available validators. * I don't see how Coffeekup that generates HTML is easier to learn than just HTML. * Or screw up the hierarchy because of whitespace errors. This is just the significant-whitespace debate brought to markup. If you want significant whitespace for your markup, I'm sure there are portable template languages with significant whitespace.
- webjprgm 14y agoHTML is great, it's just a little more verbose. I like PHP because I can wrap logic around HTML so that documents are described in document markup and code is in code. I like Mustache because I can write a document in document markup and then pass in the variables like a MS Word "mail merge". Using HTML means less things to learn, which is very good. However, HTML is definitely not the perfect language. Things like HAML and Slim are attempts to make a cleaner, less verbose document language. (However, they are mixing the ideas of document markup with code, since they are trying to solve "templating" together and not just one problem at a time.) So I appreciate things like this, but I still choose not to use them unless I'm forced to.