Deprecate assigning a slice to a static array?

Nick Treleaven nick at geany.org
Wed Aug 31 12:07:39 UTC 2022


On Wednesday, 31 August 2022 at 12:04:10 UTC, Nick Treleaven 
wrote:
>     a = s[0..2]; // copy 2 elements, no runtime check

Here of course there is a runtime check that `s.length >= 2`. But 
it is clearer the check is happening and the user could avoid 
that check with `.ptr`.


More information about the Digitalmars-d mailing list