Is [] mandatory for array operations?

bearophile bearophileHUGS at lycos.com
Sun May 9 07:21:12 PDT 2010


Pelle:
> Please, no. :)
> Just require @property for assignment-is-a-call code.

Special cases are baaaad. They are usually not special enough.

Experience shows me that implicit operations or untidy semantics often leads to big troubles, even when you don't see such troubles at first.

The obligatory usage of () makes the language a little less handy, but more tidy, and removes a source of possible troubles.

There is already a @property syntax that can be used on methods and free functions. Having another half-baked feature doesn't help the language.

Bye,
bearophile


More information about the Digitalmars-d mailing list