Re:Kotlin 1.4
by pjmlp on Tuesday August 18, 2020 @10:41AM
(#24199129)
Not at all, it is very common in ML languages, Smalltalk, and even Groovy already had it.
[ Parent
| on HN ]
I never saw that idiom in any ml classes.. I'm honestly surprised
It is a common idiom for dealing with deterministic resource management, and takes advantage that in ML all functions are single parameter actually.
So you can partially specialize, and then the lambda gets the already allocated/opened resource, thus acting as region/arena resource allocator.
And you can combine it with currying to apply the concept to multiple kind of parameters.