Hacker News new | ask | show | jobs
by aaron-lebo 3071 days ago
Reminiscent of Breve.

https://github.com/cwells/breve

I don't see a huge advantage over hyperscript (hyperapp and mithril both use it), but that is a ridiculously small codebase.

The JS hate is kind of funny around here, because when you dig into stuff like this, you realize that JS is very lispy in ways (it's easy to build up trees of HTML dynamically). In the mid aughts on r/programming people would rant and rave about the kind of stuff Smalltalk's Seaside could do. Now that's possible, most of the disadvantages have been worked out, and people hate it.

Can't win, can you?

5 comments

It's basically hiccup (https://github.com/weavejester/hiccup).
IMHO the quirkiness of JS is not the main reason for JS hate, neither is the experiments being done with it. People hate JS because they have to use JS. Clojure, C#, Go or any other language would have the same destiny if they were the only language which worked on browsers.
I like JS even though I'm a strong-types-type. I appreciate its flexibility and the way you can do clever things with it (like this project eg). It has been let down though by what was initially a v poor module system.

This then led to the myriad toolchains/PMs/bundlers/language processors that added a huge amount of grit to what should have been a blindly simple development process. Some shoddy implementations have been allowed to mature far longer than they should have, and we're still trying to recover.

But the base language is fine IMHO.

also hiccup in clojureland, https://github.com/weavejester/hiccup which has an abandoned looking python port: https://github.com/pascience/pyhiccup

Thanks, I hadn't seen Breve! I was looking for exactly this a while ago.

Haha! The main advantage I see in a syntax like this (as supposed to h by hyperapp for example) is.. not having to write `h` all the time, that and optional props.

I have been thinking of adding shorthand for id/classes in the tag name like hyperscript or JSnoX.

That would mean you could write `['input#search.large']`