3 ms·
I wish more languages had UFCS. It makes for really readable code.
by VHRanger 8y ago
I wish more languages had UFCS. It makes for really readable code.
- rattray 8y agoFor others unfamiliar with the acronym, it looks like it's Universal Function Call Syntax - en.m.wikipedia.org/wiki/Uniform_Function_Call_Syntax Lets you call top-level funtions as if they were metnks, with the receiver as the first argument. For example, these two are equivalent: add(x, y) x.add(y) As an aside, I added a similar feature to my compile-to-js lang (http://lightscript.org http://lightscript.org) and have found it to be a delightful feature. I hope an equivalent passes TC39.