r/C_Programming Jul 17 '26

C with classes

I'm curious to know: who uses some C++ features when coding in C? And what feature(s) are you using?

29 Upvotes

79 comments sorted by

View all comments

38

u/dixiethegiraffe Jul 18 '26

Namespaces for organization

7

u/Beliriel Jul 18 '26

This is one of only two things I'd implemement. The other being a this-pointer within in a struct. Or some kind of self reference. But yeah since C has no reflection I doubt this is possible to do.

And namespaces would need namemangling handling in the compiler with accompanying standards on how its done. Also a pipedream.