Re:Nuklear: A single-header ANSI C GUI library
by dangerbird2 on Saturday February 10, 2018 @12:04PM
(#16348162)
Reimplementing parts of the standard library is important for applications where you don't neccessarily have access to a standards-compliant libc (read Windows), or if you have need custom malloc/free implementations. Similar techniques are used in automake and similar build generators to provide non-standard libc function implementations. precompiled headers can help with the fact that good portions of the header will be #ifdef'ed away.
[ Parent
| on HN ]
Re:Nuklear: A single-header ANSI C GUI library
by asveikau on Saturday February 10, 2018 @12:17PM
(#16348253)
I think you completely missed the point of what you're replying to.
You can put those reimplentations in a different file. You don't have to expose the consumer of the library to them by jamming the whole thing, both interface and implementation, in a single header.
This is like library design by the folks who mistakenly say that what they do with '#include <stdio.h>' is they are "including a library". Eg. Compile and link are the same thing in a lot of people's minds, I think increasingly these days as C expertise is diminishing.
Re:Nuklear: A single-header ANSI C GUI library
by pjmlp on Sunday February 11, 2018 @03:30AM
(#16351779)
Yeah it looks like they are afraid of touching a linker.
Re:Nuklear: A single-header ANSI C GUI library
by banachtarski on Saturday February 10, 2018 @01:16PM
(#16348620)
I develop on linux primarily but occasionally windows also. The stdlib is totally fine! When did you last compile on Windows? 2011?