Fixing const arrays

Jakob Ovrum jakobovrum at
Mon Dec 12 07:27:59 PST 2011

On Monday, 12 December 2011 at 15:16:56 UTC, Adam D. Ruppe wrote:
> On Monday, 12 December 2011 at 15:07:16 UTC, Jakob Ovrum wrote:
>> The old situation where you could write complete nonsense code 
>> like ` = "foo.txt";` is far worse.
> If we start removing features because someone can use them
> when deliberately obfuscating their code, we might as well
> just abandon the whole idea of programming languages.

Firstly, no feature is removed, it is changed, unless you 
consider calling completely property-unrelated functions with 
this syntax a feature. Secondly, it is an extreme example, more 
commonly occurring examples would be conflating property access 
with calling a member function with non-trivial complexity. With 
enforced @property, the compiler helps the user write the most 
readable code for himself and more importantly, others.

More information about the Digitalmars-d mailing list