Things that may be removed
Gide Nwawudu
gide at btinternet.com
Wed Dec 17 06:03:28 PST 2008
On Wed, 17 Dec 2008 10:57:02 -0200, Ary Borenszweig
<ary at esperanto.org.ar> wrote:
>bearophile wrote:
>> There are some things I'd like to see added to the D language, but what things can be removed from it?
>>
>> "Perfection is attained, not when no more can be added, but when no more can be removed."
>> -- Antoine de Saint-Exupéry.
>> :-)
>>
>> "There should be one-- and preferably only one --*obvious* way to do it."
>> -- Python Zen, emphasis added by me :-)
>>
>> Bye,
>> bearophile
>
>Why, of course, the C syntax for types:
>
>int (*x[5])[3];
>int (*x)(char);
>int (*[] x)(char);
>
>*Ugh*...
Totally agree, learning two ways of doing things is just more effort,
but then again I didn't like C's style of declarations in the first
place. Learning Pascal before C maybe toughen me up, I haven't
suffered RSI typing ARRAY OF :)
http://mindprod.com/jgloss/unmainobfuscation.html
[snip]
29. Exploit Schizophrenia: Java is schizophrenic about array
declarations. You can do them the old C, way String x[], (which uses
mixed pre-postfix notation) or the new way String[] x, which uses pure
prefix notation. If you want to really confuse people, mix the
notations: e.g.
byte[] rowvector, colvector, matrix[];
which is equivalent to:
byte[] rowvector;
byte[] colvector;
byte[][] matrix;
At least D doesn't allow the mixture of pre/postfix notations in a
declaration.
Gide
More information about the Digitalmars-d
mailing list