Final by default?
bearophile
bearophileHUGS at lycos.com
Fri Mar 14 07:00:23 PDT 2014
Steven Schveighoffer:
> I think it may be best to introduce a new array property:
>
> dest.slength = src.length; // same as dest.length = src.length,
> but follows D1 rules (slength = stomp length)
>
> If you use slicing (I'm assuming you do), then appending would
> have to become a function/member instead of ~=.
>
> I can help write those if you want.
Eventually the D1 legacy will go away, so probably it's better to
introduce something that later can be removed safely. So instead
of "slength" it's better a name like "__slength", to allow its
usage only if you compile with the "-d" compile switch (that
activates deprecated features) and instead of a built-in array
property as "length" it could be better (if possible) to make it
a function in the object module as assumeSafeAppend.
Bye,
bearophile
More information about the Digitalmars-d
mailing list