Hacker News new | ask | show | jobs
by schveiguy 1842 days ago
There are "bad" uses of UFCS, and good ones (sometimes depending on preference). For example, I hate code like `1.writeln`.

The major feature that it provides is pipelining (as shown in the article)

2 comments

Adding a method to a class you don't control is also useful.
> I hate code like `1.writeln`

Meh... after not more than my first month into D this syntax grew on me and now I just use `1.writeln` everywhere. More than a few years later, I can't think of a single issue this has ever caused me.