Small Vectors Proposal
Mikola Lysenko
mclysenk at mtu.edu
Tue Jan 30 12:43:12 PST 2007
Walter Bright wrote:
> Thank you, this is in line with what I thought you meant. I'm glad I was
> right. Your proposal is sensible and well thought out.
>
> The only improvement I'd make is instead of:
>
> float4 f;
>
> Have:
>
> float[4] f;
>
> i.e. make static arrays of 2,3,4 dimensions have the suggested
> properties. I think this is quite doable.
Yes, Oskar made a good point in his post. The main issue I was
concerned with was the vector literal syntax. Currently array literals
are allocated on the heap when you declare them, which would be
prohibitively costly in most situations. In order for low-dimension
vectors to be useful, they need a simple constructor syntax that does
not allocate anything on the heap.
More information about the Digitalmars-d
mailing list