Hacker News new | ask | show | jobs
by epalmer 3259 days ago
>"hello world".echo

Okay I have to admit I love this one.

2 comments

It gets better with chained function calls, e.g. (D-like pseudocode):

writeln(mul(add(x, 5), 30))

vs.

x.add(5).mul(30).writeln()

UFCS.

Also found in D.

And, frustratingly, did not get past the C++ committee.

Name resolution is already so insanely complicated in C++ it's hard for me to lament this too much.
Well, the works already been done so I don't care that much about language at this point.