Haskell infix syntax

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Mar 6 17:29:24 PST 2011


On 3/6/11 6:04 PM, Jonathan M Davis wrote:
> On Sunday 06 March 2011 09:34:07 Adam D. Ruppe wrote:
>> bearophile:
>>> UFCS is a huge hack that I hope to never see in D :-)
>>
>> How is it a hack? I can understand there being implementation problems
>> that can make it undesirable to add, but calling it hack?
>>
>> It's one of the most elegant syntax proposals I've ever seen! It
>> unifies objects and other functions in syntax. It improves
>> encapsulation by giving full support to non-member functions. It
>> improves modularity for the same reason.
>>
>> With ufcs, there'd be no desire to add useless members due to
>> object syntax. Everything is equal - easy extensibility, better
>> protection, cleaner interfaces.
>>
>> It's the opposite of a hack.
>
> It is _not_ a hack. Whether it's desirable or not is another matter, but it is
> _not_ a hack. And really, the term hack is very imprecise and often subjective.
> It's the sort of accusation that pretty much kills any legitimate debate. It's
> generally unsupportable and subjective, so it adds nothing to the debate, but it
> has such a stink about it that it tends to make people avoid whatever was
> declared to be a hack.

I set out to write a post with pretty much the same message. During our 
long discussions about D2 at the Kahili coffee shop, one of us would 
occasionally affix that label to one idea or another (often in an 
attempt to make "I don't like it" seem stronger). It was very jarring.

Andrei


More information about the Digitalmars-d mailing list