Hacker News new | ask | show | jobs
by scarredwaits 5311 days ago
The components are constructed using the (make) macro, yes, and all the listener stuff that I explain is also done with macros. The selectors also use a very simple macro that makes the syntax a bit lighter (so instead of saying "and-matcher" you can just say "and"), but the mechanism is very composable, you can use your own custom functions in combination to the existing matchers.

The rest is all functions!

1 comments

As a supplement to this for non-Clojure users. You can make an amazingly composable system using pure functions. The point at which you can't is when you want to do something flash that involves a construct (called form) that isn't a function itself. For instance, a variable declaration isn't a function, nor is a type declaration.

To do the kind of magic Stathis has done here requires macros, but not many. I've been hacking Clojure for nearly two years without feeling the need to write one. (That changed two weeks ago.)