Hacker News new | ask | show | jobs
by utx00 6160 days ago
retarded is too harsh :) however the same can be accomplished through macros in a way that is better integrated with the language (when debugging lombok generated code lombok tags are not of much use i would imagine, forcing one to understand the generated code).

something like:

(defdata mountain name :setter :getter latitude :getter etc ...)

might not be too hard to implement on top of clos (or on top of defstruct - but clos has the advantage of already having flexible accessors) not sure about clojure.

1 comments

Clojure would look something like this:

    (defstruct mountain :name :latitude :longitude :country) 
    (struct mountain "Zugspitze" 47.416667 10.983333 "Germany")