5 ms·
Jav^H^H^H errr... I mean, Xtend [1] :). It does this through a mechanism called "extension methods" [2]. Kotlin has something similar called "extension function
by emmanueloga_ 12y ago
Jav^H^H^H errr... I mean, Xtend [1] :). It does this through a mechanism called "extension methods" [2]. Kotlin has something similar called "extension functions", so I'm guessing it should be possible with it too.
1: https://github.com/eclipse/xtext/blob/master/examples/org.eclipse.xtend.examples-container/contents/xtend-examples/src/example5/Units.xtend https://github.com/eclipse/xtext/blob/master/examples/org.ec...
2: http://www.eclipse.org/xtend/documentation.html#extensionMethods http://www.eclipse.org/xtend/documentation.html#extensionMet...
3: http://confluence.jetbrains.com/display/Kotlin/Extension+functions http://confluence.jetbrains.com/display/Kotlin/Extension+fun...