News for hackers. Stuff that matters.
Re:C-for-all: Extending C with modern safety and productivit... by pcr910303 on Wednesday December 04, 2019 @03:24AM (#21700515)
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/1e70e82baa9193f6f02...

Re:C-for-all: Extending C with modern safety and productivit... by jononor on Wednesday December 04, 2019 @04:18AM (#21700756)
If you are targeting nix/BSD/MacOS/Windows then https://developer.gnome.org/glib/ is pretty good standard library for C. Not supported on bare-metal though.
Re:C-for-all: Extending C with modern safety and productivit... by thechao on Wednesday December 04, 2019 @08:20AM (#21701887)
Right? 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.

Re:C-for-all: Extending C with modern safety and productivit... by kannmig on Wednesday December 04, 2019 @05:58AM (#21701190)
Re:C-for-all: Extending C with modern safety and productivit... by saagarjha on Wednesday December 04, 2019 @06:05AM (#21701213)
That 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…)
Re:C-for-all: Extending C with modern safety and productivit... by ftvy on Wednesday December 04, 2019 @06:31AM (#21701302)
It is the de facto standard on Linux.
Re:C-for-all: Extending C with modern safety and productivit... by pjmlp on Wednesday December 04, 2019 @07:23AM (#21701554)
That doesn't make it the official implementation of ISO C, just one among many.
Re:C-for-all: Extending C with modern safety and productivit... by Porthos9K on Wednesday December 04, 2019 @04:35PM (#21707349)
Which Linux? There are plenty that use MUSL instead.
Re:C-for-all: Extending C with modern safety and productivit... by hybrids on Wednesday December 04, 2019 @06:24AM (#21701286)
musl 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.