3 ms·
Do they have a coding style or similar in which this is outlined? I had a quick look at the code but I would be interested in what "a style that is something b
by iorrus 6y ago
Do they have a coding style or similar in which this is outlined?
I had a quick look at the code but I would be interested in what "a style that is something between C and C++" actually entails.
Avoiding templates but using classes/namespaces?
Minimizing use of the stl?
- s9w 6y agoKindof. Almost no standard library but it does use namespaces. (almost) no templates. Lots of pointers and arrays. Lots of explicit begin/end or push/pop functions instead of more idiomatic solutions like RAII/scope guards etc. va_ macros instead of variadic templates or fold expressions. Also while ImGUI is great and the guy follows good coding practices - it's not at all what I would recommend for learning C++. Not only is it technically not C++, but the problem it solves (GUI-Framework and immediate on top) leads to some pretty hard to follow code with a lot of hidden global state.
- iorrus 6y agoThanks that’s a great explanation
- gpderetta 6y ago> Lots of explicit begin/end or push/pop functions instead of more idiomatic solutions like RAII/scope guards etc. va_ macros instead of variadic templates or fold expressions. I'm going to have nightmares tonight.
- s9w 6y agoIt's a simple API, that's for sure. But it's pretty consistent in itself and obviously is trivial to build abstractions upon. Also makes it easy to port to other languages.
- ncmncm 6y agoThat sounds like uniformly bad code.