|
|
|
|
|
by rogue7
320 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 ) s.encode(3).count.println
However, this is of course impossible to implement in most languages as the dot is already meaningful for something else.[0] https://koka-lang.github.io/koka/doc/book.html#sec-dot |
|
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/