31
Feature requests / SFML should use only types of defined size
« on: October 29, 2011, 03:54:06 pm »Quote from: "Laurent"
QuoteThis leads to difficulties to have consistent results on different hardware.
Which difficulties? On which hardware?
Well nothing more than 32 -> 64 bits arch can sometime lead to funcky linking error in klingon (native language of the linker). And people rusually don't have both architectures ready to test.
Quote from: "Laurent"
QuotePlus, this leads to difficulties to interface SFML with languages other than C or C++, that can have different type systems.
Which languages? So far, SFML has been ported to many languages without any problem.
Actually any language that have a different type system than C/C++ will experience issues with that. It doesn't means this is impossible (actually, it has been done sevral time) but it is error prone.
I'm currently working on the D port and experiencing issue with that (D has fixed size type system). A java port will have even more problems with that if it's done one day.
gsaurus > I didn't mesure that, so this is speculation, but I don't thnink working on a 32 bit value is slower than on a 64bit one on recent intel's or AMD's CPU.
The point is : 64bit values doesn't make any sense in many places where int are used. Consider Videomode. Do we really expect that the width or height of the screen will be more than 4 bilions pixels ?
The same goes for sampleRate or ChannelsCount in SFML-audio classes. Do we really expect someone have a sound to play with more than 4 billions channels ?
Using fixed size types here would make SFML easier to handle cross plateforms and cross languages.