Skip to content

Comment on dōmo: Markup, style, and code in one language

Comments

Interesting idea, but I just don't like the implementation. Just a few points that jump out for me.

- The all CAPS make me feel it will be a pain to type. - The CSS looks more verbose than SASS or LESS. The STYLE keyword each time seems like needless repetition. - I feel like the HTML templating is less readable than plain HTML or Slim or such tempting engines.

Just my thoughts, I would love to know what others think.

This is great feedback.

- The caps are there to prevent global namespace collisions, since the chances of UPPERCASE global variables existing is smaller. I don't want to add lowercase names to the global, but they would be fine on the domo object itself, so maybe I should put both UPPER and lower there anyway.

- The CSS may be more verbose that LESS in JavaScript, but it compiles much faster and there's only 228 of code needed to get it. If you want sugar, just use CoffeeScript and it's probably even cleaner than LESS.

https://github.com/jed/domo/blob/master/docs/index.coffee#L1...

- The STYLE keyword is just there because that's where the "on" function lives. You could assign it to a local variable make the reference shorter.

- Yes, with bare JavaScript this is probably true, but the idea is to make sugar optional. Add your own and it looks like HAML:

https://github.com/jed/domo/blob/master/docs/index.coffee#L3...

Thanks for the reply Jed, yeah I understand your decisions and some of the advantages of going with CoffeeScript. I will definitely keep an eye on the project going forward. Just a quick thought:

- Maybe better syntax highlighting of the core elements on the website might help with new potential users.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.