www.digitalmars.com         C & C++   DMDScript  

D - Syntax regularity and consistence

reply Bono Vox bono u2.art writes:
D has a algol like syntax like C and like C++ .
But there are some point where the syntax don't have a regularity and
consistence with the remaining of the language.
The new, delete and cast, for example, do not conform with the syntax of C/C++
or D.
Why they are not simple functions like in math?
Why not write they as "language functions"?

foo = New(typeOfFoo, 1, 2, 3);
bar = cast(foo, typeOfBar);
s = format("Why not %s ?" , s2);
Jun 23 2003
parent Georg Wrede <Georg_member pathlink.com> writes:
In article <bd85sc$1m5$1 digitaldaemon.com>, Bono Vox bono u2.art says...
bar = cast(foo, typeOfBar);
I'd prefer bar = cast(typeOfBar, foo);
Jun 24 2003