News for hackers. Stuff that matters.
Re:Nuklear: A single-header ANSI C GUI library by gameswithgo on Saturday February 10, 2018 @08:04PM (#16350558)
I don't understand why anyone cares. you grab the .h file and call "load a jpeg"/"draw a button" or you grab two files and call "load a jpeg"/"draw a button"

Are we bikeshedding about this?

Re:Nuklear: A single-header ANSI C GUI library by Koshkin on Saturday February 10, 2018 @09:56PM (#16350936)
This is a matter of adhering to a sound engineering principle, and the approach in question has not been generally considered acceptable. To explain why, one of the ideas behind header files was that they could be freely reused in more than one part of a project; therefore, for example, any executable code appearing in a header file might end up existing in multiple copies throughout the executable (perhaps, depending on the linker).
Re:Nuklear: A single-header ANSI C GUI library by jcelerier on Sunday February 11, 2018 @01:30PM (#16353960)
> any executable code appearing in a header file might end up existing in multiple copies throughout the executable

that's why the keyword "inline" exists.

Re:Nuklear: A single-header ANSI C GUI library by Koshkin on Sunday February 11, 2018 @02:22PM (#16354244)
'Inline' does not prevent duplication of the generated code (in fact, it forces it).
Re:Nuklear: A single-header ANSI C GUI library by dllthomas on Sunday February 11, 2018 @03:05PM (#16354461)
... mostly. Except in the case where the inlined version can be optimized away, which is the best time to use inline but not entirely germane.