T[new]

Walter Bright newshound1 at digitalmars.com
Mon Aug 10 14:43:57 PDT 2009


Jeremie Pelletier wrote:
> Walter: what will the string types be aliased to now: still
> immutable(char)[] or immutable(char)[new]?

immutable(char)[]

> I think it would be best to have them use the array [new] type.

The vast majority of uses will not need to be resizeable.

> Functions which do not modify the string length can mark the string
> as an in parameter, and immutable(char)[] should be castable to
> const(immutable(char)[new]) in such cases to still allow slices to be
> passed.

A slice won't be castable to a resizeable.




More information about the Digitalmars-d mailing list