More D newb questions.

BCS ao at pathlink.com
Thu May 8 16:21:05 PDT 2008


Reply to Me,

> Sorry, but I just don't buy that. Programmers are well used to the
> concept that aggregates are composed of elements.

[...]

> D already allows these and no one is confused by it.

[...]

> No one is surprised by any of these. There is nothing inconsistant.
> 


It's not a matter of surprise or confusion. It's a mater of being able to 
tell what the type of an expression will be without knowing what the type 
of the parts are. This is extremely important with template code.


e.g, will this compile under your rules?

void Fn(T)()
{
  T a, b;
  auto c = a ~ b;
  T d = c;
}

hint: you can't tell and the error message will not be on the line where 
the error is.





More information about the Digitalmars-d mailing list