auto storage class - infer or RAII?
Walter Bright
newshound at digitalmars.com
Sun Nov 12 02:49:20 PST 2006
Lionello Lunesu wrote:
>> (a) Get rid of 'auto'.
> I completely agree. The current "auto" can then be tagged as deprecated and
> removed Jan 1st!
>
>> (b) Create a new keyword that is more obviously read as 'type inference'.
> I like "var".
My problem with "var" is the history of the keyword. Back in the olden
days, there were two main camps of programmers - the Pascal people, and
the C people. Each camp looked with disdain upon the other as "not
getting it". The Pascal crowd progressed to Modula 2, Object Pascal, and
eventually Delphi. The C family progressed to C++, Java, and D. There
didn't seem to be much voluntary mixing up, people would switch camps
only under duress.
So I have a real (possibly outdated) concern that "var" appearing in D
will make the language distasteful to the C crowd. The appearance of a
language matters a lot, it's like the clothes one wears that identifies
one (consciously or not) as being with a particular group.
And that's why I've avoided using "var".
("let" is far worse, as it gives the impression that D is some sort of
new Basic language.)
>> (c) Create a new keyword that is more obviously read as 'resource
>> destruction at end of scope'.
> I like "scope"
>
> L.
>
>
More information about the Digitalmars-d
mailing list