3 ms·
It depends a bit what you mean, but Groovy is quite interesting from a meta-programming point of view. Much of the syntax can be completely reprogrammed at run
by zmmmmm 8y ago
It depends a bit what you mean, but Groovy is quite interesting from a meta-programming point of view. Much of the syntax can be completely reprogrammed at run time through an object's 'metaClass', and you can write AST transformations that deeply rearrange the code at compile time.
Although it is certainly not as pure as the Lisp-like languages, it can be an incredibly fast and easy way to create a DSL to solve your problems in a very idiomatic way.
- karmakaze 8y agoI never thought of Groovy for metaprogramming but it's used to make DSLs so it makes sense. My only run in has been with Gradle which is so slow and/or a memory hog so didn't leave a good impression on me.
- zmmmmm 8y agoIt's unfortunate that most people meet Groovy through Gradle. It's a really confusing and unpleasant experience and I think is responsible for a lot of the bad rap that Groovy gets. It's actually way better than Gradle makes it look!