On Thursday, 24 January 2013 at 17:49:18 UTC, Andrei Alexandrescu wrote:
On 1/24/13 6:50 AM, mist wrote:
I am probably I minority here but I liked the most strict -property
version and it made a lot of sense to me. Rationale is simple:
some().ufcs().chaining(); - this is just a minor syntax inconvenience

It becomes way uglier with templates: some!(e1)().ufcs!(e2)().chaining!(e3)(). In fact look at the code written by Nick in _favor_ of the parens. Self-destruction at its finest.

I can hardly see any problems in your code sample. Syntax inconvenience means nothing when compared to semantic inconvenience. It is just matter of visual preferences after all, you can get used to it quite fast.


anything; - this drives me crazy, there is no way to understand if this

I was amazed at how quickly I got used to it.

...


You'll still be able to use parens.


Andrei

You see, contrary to UFCS chaining this is not habit or syntax issue. It is semantic one - I am loosing an ability to distinct data access from function call by simply looking at code. There is nothing I can get used to - in a sane design I have this info, in D I do not. You have been just shown a few very good examples regarding functions, returning delegates - it is exactly the case where it shines.

Yes, I am able to use parens, but in _my_ code I also do not need -property or anything - I am C++ programmer after all, I can discipline myself to certain code style even without compiler help. But writing generic code and reading one of others... I am glad I have not had to do any high-order function generic processing yet.

Reply via email to