Small Vectors Proposal
Bill Baxter
dnewsgroup at billbaxter.com
Tue Jan 30 13:06:12 PST 2007
Oskar Linde wrote:
> Mikola Lysenko wrote:
> [snip]
>> 1. Additional primitive types
>>
>> byte2, byte3, byte4, short2, short3, short4, int2, int3, int4, long2,
>> long3, long4, cent2, cent3, cent4, ubyte2, ubyte3, ubyte4, ushort2,
>> ushort3, ushort4, uint2, uint3, uint4, ulong2, ulong3, ulong4, ucent2,
>> ucent3, ucent4
>> float2, float3, float4, double2, double3, double4, real2, real3, real4
>> ifloat2, ifloat3, ifloat4, idouble2, idouble3, idouble4, ireal2,
>> ireal3, ireal4
>> cfloat2, cfloat3, cfloat4, cdouble2, cdouble3, cdouble4, creal2,
>> creal3, creal4
>
> I think the arguing makes much sense, but as the proposal adds 57(!) new
> domain specific primitive types to the D language specification, I
> believe it is way too heavy.
Yes I agree with Oskar and Walter that all those 57 primitive type names
are not needed in the core language, and instead float[4] should act
like your float4.
But for users, this kind of alias should behave as expected:
alias float[4] float4;
And a std.vecmath library could define all 57 of the aliases above.
--bb
More information about the Digitalmars-d
mailing list