[SDL] SDL 2.0 API stabilization

Sik the hedgehog sik.the.hedgehog at gmail.com
Thu Mar 7 04:30:01 PST 2013


My concern isn't with programs using SDL 1.2, but with programs that
already use SDL2. It has been quite a long time so I guess there's a
good chunk out there. Although I wonder how many programmers even
bothered to use size-defined types for starters.

Again, I suppose that in the worst case we could just tell developers
to use those typedefs I mentioned earlier and save them the headache
of rewriting code.

2013/3/7, Alexey Petruchik <i100500 at gmail.com>:
>> In my experience programmers have a tendency to ignore stdint.h whenever
>> possible :P
> It's obviously a bad practice, isn't it?
>
>> how much of an impact this change would cause.
> SDL 2.0 is already not backward compatible with SDL 1.2
>
>> if I recall correctly MSVS didn't come with stdint.h at all until
>> relatively recent versions
> Yes, they had added stdint.h in 2010. Yes there is no stdint.h on some
> platforms and old compilers.
> But SDL already has code to define stdint.h types on platforms where
> it's missing (old MSVS, nintendods, ...)
>
> On Thu, Mar 7, 2013 at 2:26 PM, Sik the hedgehog
> <sik.the.hedgehog at gmail.com> wrote:
>> In my experience programmers have a tendency to ignore stdint.h
>> whenever possible :P
>>
>> Now seriously, I completely ignored SDL types in favor of the stdint.h
>> ones so I wouldn't care about such a change. I don't know how many
>> projects rely on them, though, so no idea how much of an impact this
>> change would cause.
>>
>> I suppose that in the worst case we could always tell the programmers
>> to just do this:
>>
>> typedef Int8 int8_t;
>> typedef Int16 int16_t;
>> typedef Int32 int32_t;
>> typedef Int64 int64_t;
>> typedef Uint8 uint8_t;
>> typedef Uint16 uint16_t;
>> typedef Uint32 uint32_t;
>> typedef Uint64 uint64_t;
>>
>> PS: if I recall correctly MSVS didn't come with stdint.h at all until
>> relatively recent versions, so I imagine that SDL not relying on
>> stdint.h may have been influenced by that.
>>
>> 2013/3/7, Alexey Petruchik <i100500 at gmail.com>:
>>> Another controversial proposal ;) Maybe it's time to remove SDL integer
>>> types (Uint8, ...) in favor of <stdint.h> types (uint8_t, int8_t, ...)?
>>> SDL
>>> integer types are just typedefs to stdint.h types so why we need them at
>>> all? SDL integer types removal will encourage programmers to use
>>> <stdint.h>
>>> types in their programs instead of spawning
>>> yet-another-alias-for-thing-that-already-has-a-name.
>>>
>>>
>>> On Thu, Mar 7, 2013 at 1:15 PM, Sik the hedgehog
>>> <sik.the.hedgehog at gmail.com
>>>> wrote:
>>>
>>>> The problem would be that then you'd have to rename about every
>>>> function in order to achieve that, and I don't think many people would
>>>> be happy with that :/ (and besides, even though the SDL2 API still
>>>> isn't 100% fixed, I don't think that doing a near complete rewrite of
>>>> existent SDL2 programs is going to be a good idea).
>>>>
>>>> I'm not sure many people look up for a function in an alphabetical
>>>> list, though. Functions are already separated by category (both in the
>>>> wiki and in doxygen), in practice that seems to be way more useful
>>>> (and in fact it's pretty much the only way I look up for SDL
>>>> functions). If you already know the name beforehand an alphabetical
>>>> list is better, but at that point you don't care about whether it's
>>>> organized by categories or not.
>>>>
>>>> 2013/3/7, Vittorio Giovara <vittorio.giovara at gmail.com>:
>>>> > So, for a brief moment there was a half idea of moving the sdl api
>>>> > from
>>>> > SDL_VERB_NOUN to SDL_NOUN_VERB
>>>> > so that for example SDL_TryLockMutex() would become
>>>> > SDL_MutexTryLock()
>>>> > This idea was thought on the basis that it would make the
>>>> > alphabetical
>>>> > listing more logical and would simplify grouping similar APIs.
>>>> >
>>>> > Is this idea still lingering around (and it's just a matter of
>>>> > volunteers
>>>> > submitting patches) or has it been discarded completely?
>>>> > Cheers,
>>>> > Vittorio
>>>> >
>>>> > On Mon, Feb 18, 2013 at 8:19 AM, Sam Lantinga <slouken at libsdl.org>
>>>> wrote:
>>>> >
>>>> >> We're on the road to release for SDL 2.0.
>>>> >>
>>>> >> To that end, most of the existing APIs are stable, and we'll only
>>>> >> change
>>>> >> them if it's critical.
>>>> >> There are a few things which are still being considered, such as the
>>>> >> iOS
>>>> >> event handling, and touch/mouse event semantics, but by and large
>>>> >> the
>>>> API
>>>> >> is set for release.
>>>> >>
>>>> >> Please report bugs which are affecting you in the current snapshot:
>>>> >> http://www.libsdl.org/tmp/SDL-2.0.zip
>>>> >>
>>>> >> If anyone wants to fix anything currently in bugzilla, they are more
>>>> than
>>>> >> welcome:
>>>> >> http://bugzilla.libsdl.org
>>>> >>
>>>> >> Cheers!
>>>> >> --Sam
>>>> >>
>>>> >> _______________________________________________
>>>> >> SDL mailing list
>>>> >> SDL at lists.libsdl.org
>>>> >> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>>>> >>
>>>> >>
>>>> >
>>>> _______________________________________________
>>>> SDL mailing list
>>>> SDL at lists.libsdl.org
>>>> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>>>>
>>>
>> _______________________________________________
>> SDL mailing list
>> SDL at lists.libsdl.org
>> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>



More information about the SDL mailing list