
Generics
Posted Sunday, 28 June, 2009 - 18:17 by agadoul inHI,
I have been developing for quite some time now with openTK and I love it.
The only problem I always have is the lack of generics.
Let me explain. If for example, I want to develop a KeyFrameAnimation class,
I need to create KeyFrameAnimationVec2f, KeyFrameAnimationVec3f, KeyFameAnimationVec4f.....
which is relly a pain in the ass when a KeyFrameAnimation where T is a vector3f, vector4f... would do the trick.
I know that operators are quite a pain in the ass to implement in c# generics but there is still some solutions:
http://www.codeproject.com/KB/cs/genericnumerics.aspx
http://www.codeproject.com/KB/cs/genericoperators.aspx
Do you think I might have the chance to see this feature in a future release or not ?
thanks.
Axel.


Comments
Re: Generics
The lack of generic operators in .Net is quite annoying indeed.
There are no plans to add such functionality in OpenTK. However, patches are welcome.
Re: Generics
Consider using Boo:
http://boo.codehaus.org/
It suits .NET perfectly, provides friendly language interface, generics, extensibility and more.
It's still not 1.0, but develops actively towards it.
I started using it recently and very glad seeing the smaller size and better readability of the code (after C++).
Re: Generics
ok it's a shame it's not going to be implemented but tha's not a BIG problem.
I do not like python like programming languages so boo might not be the good fit for me.
is boo really use generics like in c# or templates-like version like in c++?