array error

Koroskin Denis 2korden at gmail.com
Sun Jul 20 05:18:30 PDT 2008


On Sun, 20 Jul 2008 16:09:38 +0400, bearophile <bearophileHUGS at lycos.com>  
wrote:

> Koroskin Denis:
>> - you can declare array like "int mVector[];" as well as "int[]  
>> mVector;".
>
> I don't agree, the right way to declare it in D is "int[] mVector;".
>
> The other way is just for code translated from C (and to confuse  
> programmers. As the Zen of another language says: "There should be one--  
> and preferably only one --obvious way to do it."  So I'd probably like  
> to remove that syntax).
>
> Bye,
> bearophile

I just didn't want to push the guy too much :)
Experience comes with time. It's too hard to change habits at once.


More information about the Digitalmars-d-learn mailing list