Who came up with idea of builders via extension methods?


#1

We had a debate elsewhere on the origin of Kotlin’s implementation of typesafe builders.
The point is that the connection between builders and extension methods is not obvious. Function passed as parameter automatically becomes extension method (due to parameter declaration like HTML.()) - nice idea indeed.
The question is: is it Kotlin’s idea, or it was borrowed from some other language?
[ To be more precise, the question is NOT about typesafe builders per se - many languages have them - but about this particular concept ]
–Alex


#2

AFAIK, we were first to introduce this (Groovy’s approach to builders is very different). Our approach was later adopted by xTend (and we are happy about it).

As a matter of personal attribution it can be traced back to discussions between Maxim Shafirov and myself.