grep

Dee Girl deegirl at noreply.com
Sat May 10 13:54:48 PDT 2008


terranium Wrote:

> Dee Girl Wrote:
> 
> > Maybe check insertion could be arranged by the compiler. Java does that. But it is generally better to detect type errors earlier. D has const so not much expressive is lost. Dee Girl
> 
> Typecheck can't be arranged out of nothing. Java and CLR can do a typecheck because array is an object there, a complex object, arrays in D are just slices - pairs of pointer and length. There is no way to do a typecheck, because there is no type to check against.

I finally understood, thank you. Your explanation is another good argument: that covariance of modifiable arrays should be statically disallowed. Dee Girl



More information about the Digitalmars-d mailing list