[Mono-dev] Mono.Simd API Suggestions
Rodrigo Kumpera
kumpera at gmail.com
Thu Nov 6 09:04:40 EST 2008
Hey Jonathan,
Thanks for taking some time looking at the Mono.Simd API and doing
some suggestions
but, please, do then on a more visible mailing list such as mono-devel.
>Just perusing through the Mono.Simd API, and one question (and a few
>other suggestions) occurs to me: Why the non-reliance on method
>overloading?
Right now mostly due to implementation details, so no reason at all.
I'm still playing
with the option of using extension methods. It would have the same
benefit of overloading,
would reduce typing and not make people mad when changing the underlying type.
It's a mater of choosing between "a.UnpackLow (b)" "Vector2l.UnpackLow
(a,b)" and
"VectorOperations.UnpackLow (a,b)". Feedback on this subject is more
than welcome.
Only a small part of the operations are available for all types and
some are under different
instruction sets. This should be enough to make it pretty confusing
for the user.
>On a completely different note (and to start a bikeshed discussion ;-),
>why "ShiftRightLogic"? Wouldn't "LogicalRightShift" be more
>conventional? We should also avoid abbreviations, so
>SubtractWithSaturation() would be better than SubWithSaturation()...
There is a very reasonable and compelling argument for that. I'm very
bad at naming
methods and only now people are starting to look more deeply at it.
The shift one
is a pretty bad choice indeed.
OTOH, on some cases this might lead to some very very long method names.
Thanks,
Rodrigo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20081106/c2f65bb1/attachment.html
More information about the Mono-devel-list
mailing list