auto storage class - infer or RAII?
Ary Manzana
ary at esperanto.org.ar
Sun Nov 12 07:06:37 PST 2006
Andrey Khropov escribió:
> Ary Manzana wrote:
>
>> So change "var" into "infer", as others sugested, if the only concern is the
>> name of the keyword. :-)
>>
>> infer x = 2;
>> infer y = new Foo();
>
> Khm, 5 characters for such a common keyword is too long (may be 'inf', but inf
> is a common word for infinity)
What?!
I'm not going to time it, but typing "inf", "var", "auto", "infer",
"while", "foreach", etc., should take you about the same time. I don't
think a char or two make the difference (I don't know wether your
concern is typing it or if the source code will have 5 o 6 bytes more).
Second, I don't know if it such a common keyword. Look at all these
keywords: "while", "static", "class", "interface", "foreach",
"override", "alias", "import", "module", "assert" (very, very common!),
"continue", "break", and the list goes on (let's not talk about
"foreach_reverse" :-P). I think clarity instead of "let's save letters
to make our language more compact... but less clear" is better.
"interface" has 9 letters, why now change it to "inter"? It's a very
common keyword, and we'll save some bytes there.
> And 'infer' also looks very close to 'inferior'.
But "infer" *is* "infer", it's not "inferior". And people would know
that "infer" is what it is (at least it's more obvious than "auto").
Just my opinion...
More information about the Digitalmars-d
mailing list