Hacker News new | ask | show | jobs
by always_good 3071 days ago
What makes Hiccup so nice in the Clojure world is that Paredit can be used here which is the tool you're already using to manipulate data structures.

For example, with Paredit, you can create an element and then move it prev/next/up/down a tree with muscle memory you're already using for the rest of your code.

When I re-entered the Javascript world, I tried arrays-for-html but realized it's unbearable without manipulation tooling. I think something like JSX makes more sense at that point since I find you're more likely to already be using an HTML manipulation tool like Emmet which is more pleasant than hand-editing array structures.

1 comments

evil-lisp-state (used by default in Spacemacs) is a paredit-like thing that seems to work with parens, braces, and brackets in any language I happen to be using. I've used it with Python and Javascript without really thinking about it.

I've never used paredit in emacs, but I suspect that it might be amiable to working on Javascript as well.

More annoying to me would be all of the extra quotes and commas I need compared to Hiccup implementations in Clojure.