6 ms·
Look at that, you almost reinvented `hiccup` (https://github.com/weavejester/hiccup https://github.com/weavejester/hiccup) :) Taking things a bit further, you
by diggan 3y ago
Look at that, you almost reinvented `hiccup` (https://github.com/weavejester/hiccup https://github.com/weavejester/hiccup) :)
Taking things a bit further, you get an almost full copy of hiccup, and can save even more space and make it even simpler:
[div.card
[h3 "Familiar browsing experience"]
[p "Clear real-time audio...."]]
Removing the closing elements, make children nested without opening/closing brackets, make strings explicit and you're done! (only difference is hiccup/clojure would make you use :div and :h3 instead, as they're keywords)
- gardenhedge 3y agoThat's not as good because it becomes unwieldy without tooling. I used Flutter recently which was great but without tooling I wouldn't have gotten much done. I would spend too much time trying to find closing parenthesis.
- keepamovin 3y agoNot sure your IDE but vim has a little highlight on the other when you cursor over 1 paren, bracket, whatever. It should work here too! :)
- keepamovin 3y agoHaha! :) Good to know someone's done it before :) Yeah cool you can remove the closers via indent, or you could eschew indent and just use a ']' to close as above. Hiccup? Nice, thank you! :)