Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Single header, no dependencies, cross platform, immediate mode, and the GUI examples actually look good... that’s wild.


Not to mention written in C89. This person knows how to distribute code well. I love libraries like this, I wish we had more.


How relevant is C89 really nowadays? As far as I understand it took MSVC a long time to catch up to C99, but it's been there for a long time now. Is the motivation more related to retrocomputing? I would expect that decades-old compilers for retro platforms might not be reliably C89 conforming either.


https://en.wikipedia.org/wiki/C99#Implementations

Only 7 of the 24 compilers in the list fully implements C99 whereas I would guess all those compilers implement C89. If you want to write long-lived programs, C89 is a good choice.


Thanks, though those numbers may be a bit misleading. It's probably feasible to have very widely portable programs in C99-except-obscure-pragmas. But MSVC in particular seems to be less far along than I thought. Oh well.


Also, the difference between C89 and C99 is not that big.


It’s not just retro computing, new hardware platforms bootstrap themselves by providing a c89 compiler. It’s just good form. Imo c99’s additional features are not worth losing nearly universal portability. It’s trivial to reimplement most of c99’s useful features with a small header if you must, as this library does.


msvc's still not hit C99, but to be fair, they're not aiming for it

(last I checked a year or two ago)


ImGui is nice too. I use it for quick UI hacks in Python :)


Should clarify that you're referring (I presume) to dear imgui. Imgui in general refers to the immediate mode gui paradigm in general, as opposed to retained mode gui.


Yes that one. Though I have only ever seen dear imgui written as ImGui. It’s really sweet. I taught my 14 year old son the basics and he is making all sorts of weird GUIs now lol


It's really nice. I was surprised at how well it works. Downloaded it, ran make inside the example folder, and it built working examples.


Why is a single headerness so important here?



It's not important at all. “single-header-library“ in C basically means #including a .c file in disguise. It's for people who are too lazy to add a source directory to their build system...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: