3 ms·
I really don’t need an extended-C with productivity features... as that’s one of the defining points of C(the language is small). Fixing the warts (like differe
by pcr910303 7y ago
I really don’t need an extended-C with productivity features... as that’s one of the defining points of C(the language is small). Fixing the warts (like different behavior between the overflow of unsigned ints & signed inta) would have been fine.
I personally want a better stdlib for C; fix the defiancies of <string.h>, removing the global locales (changing function behaviors according to LC_* was a really, really bad idea[0]), etc...
Does anyone know of an alternative stdlib for C?
[0] https://github.com/mpv-player/mpv/commit/1e70e82baa9193f6f027338b0fab0f5078971fbe https://github.com/mpv-player/mpv/commit/1e70e82baa9193f6f02...
- thechao 7y agoRight? I keep thinking that the first place to start on a better C is to ask what needs be removed — not added. Once the “bad parts” are removed, what ergonomic features need be added back in? For starters: implicit coercion is out; weak type aliasing is out; automatic binary serialization of aggregate types is out; etc.
- jononor 7y agoIf you are targeting nix/BSD/MacOS/Windows then https://developer.gnome.org/glib/ https://developer.gnome.org/glib/ is pretty good standard library for C. Not supported on bare-metal though.
- kannmig 7y agohttps://www.musl-libc.org/ https://www.musl-libc.org/
- saagarjha 7y agoThat doesn't fix the issues mentioned. (Whether it's an "alternative" stdlib for C is debatable; nobody ever said that glibc is "the" stdlib for C…)
- hybrids 7y agomusl is just another implementation of the true stdlib. I think what they want is an alternative to standard-conforming stdlibs that fills a similar niche - in other words, a "non-standard" standard library.