▲ | rogue7 7 days ago | |||||||
This looks neat. However since I read about Koka's dot selection [0], I keep thinking that this is an even neater syntax: fun showit( s : string )
However, this is of course impossible to implement in most languages as the dot is already meaningful for something else. | ||||||||
▲ | btbytes 7 days ago | parent | next [-] | |||||||
It is called Uniform [Function] Call Syntax. D has had this for decade(s): https://tour.dlang.org/tour/en/gems/uniform-function-call-sy... Nim too has it: https://nim-by-example.github.io/oop/ | ||||||||
▲ | jprafael 7 days ago | parent | prev | next [-] | |||||||
That syntax is very clean when it works. I think however the limitation of not being able to pipe arguments into 2nd, 3rd, ..., positions and keyword arguments, or variadic explosion like the syntax showcased in the article makes it less powerful. Are there other syntax helpers in that language to overcome this? | ||||||||
| ||||||||
▲ | throw-the-towel 7 days ago | parent | prev [-] | |||||||
I think this is called uniform function call syntax. |