C-like static array size inference - how?
forkit
forkit at gmail.com
Wed Jun 8 06:09:13 UTC 2022
On Wednesday, 8 June 2022 at 01:32:42 UTC, Steven Schveighoffer
wrote:
>
> I like `$`. It's got a well-defined meaning, and already is
> somewhat magic.
>
> -Steve
I agree it's magic.
warray[5..$] - this is one of the best uses of syntax magic in D!
I think it's what first attracted me to the language actually.
A little more 'magic', and this could be possible:
int[n] myArray = [1,2,3];
( I think I like the use of 'n' more than '..' or '$' actually).
More information about the Digitalmars-d-learn
mailing list