I use extension methods fairly heavily, up until now for creating tooling
and application-specific DSLs, and now with LLM tooling I find the semantic
compression helps improve the results. However, the restriction that
extension methods have to be compiled beforehand is a real friction point,
making it impossible to write certain kinds of business DSLs that would be
useful.

Kotlin resolves extension methods by statically importing the method and
then treating that as on the search path. How difficult would it be for
Groovy to support this mechanism also, so that methods in the same
compilation unit (or, I suppose, third-party libraries without a manifest)
could be used?

Reply via email to