Closed jbeja closed 9 years ago
Hello. My library definitely has more macros than most. The reason is that I wanted to provide a convenient syntax for using libGDX classes. For example, the following code...
(texture "clojure.png"
:flip true false
:set-region 0 0 100 100)
...is transformed at compile-time to this:
(let [entity (texture* "clojure.png")]
(doto ^TextureRegion (:object entity)
(.flip true false)
(.setRegion 0 0 100 100))
entity)
It makes it a lot more terse and readable. I wanted to provide this functionality for more than just the TextureRegion
class, so I made a separate macro for each class that I wanted this functionality for.
Oh I see, make sense now. Thanks for answering.
First of all, awesome library!
I am a beginner to Clojure and learning for the source code I have seem so many even in case where I don't see that there isn't any benefit, am I missing something here?