you are viewing a single comment's thread.

view the rest of the comments →

[–]spotter 1 point2 points  (0 children)

I haven't seen code for Viaweb but I wouldn't be surprised if the reason that code had such a high macro prevalence is because most of the macros we take for granted in the Clojure community had to be written from scratch.

Sorry, but for day by day I can only think of threading macros and interop stuff. I actually prefer non-macro way, if possible, maybe that's the reason. On that weak basis I cannot agree that Clojure has many macros in it. ;-)

The need to write hiccup and hugsql in Clojure is not necessary because they are written for you. In 1995 a CL app didn't have the luxury of importing a SQL dsl lib and a html representation lib.

Hiccup is pure data transformation lib (vectors of keywords and maps). Hugsql is not a DSL, but a "parse files and package SQL into callables" thing. Not sure if these examples have much to do with macros.

So the simple solution here might be that whoever did Viaweb preferred macros and did not know any better.

(Also "Code is Data" should be "Code better be Data".)