July 20th, 2024

Tonsky: Don't go crazy with Clojure unless it makes you happy

The author shares their journey using Clojure macros for Humble UI's component library, emphasizing the language's flexibility in enabling unconventional solutions like reading source files and fetching code seamlessly.

Read original articleLink Icon
Tonsky: Don't go crazy with Clojure unless it makes you happy

The author discusses their experience with Clojure macros while working on Humble UI's component library. They wanted to document the library and use it as an integration test by showcasing every possible option. They created a macro that generates a table displaying running code alongside its source. Initially, existing formatters didn't meet their needs, leading them to consider reading the source file directly within the macro. Despite acknowledging the unconventional approach, the author appreciates Clojure's flexibility in allowing such experimentation without complex tooling. They highlight the language's unique ability to enable unconventional tasks like reading source files or fetching code from the internet seamlessly. The post reflects on the joy of working with Clojure for its capacity to explore unconventional and creative solutions within a concise and straightforward codebase.

Link Icon 3 comments
By @bushwald - 3 months
That's not the title of the article, nor a description of its content
By @solanav - 3 months
This is why I started to learn Common Lisp a year ago. This is the kind of power I miss when I have to go back to Python…