News for hackers. Stuff that matters.
Re:Polymorphic Types in C [pdf] by sigsev_251 on Thursday January 18, 2024 @11:23AM (#39043678)
Because there are platforms with no, or really buggy C++ support.
Re:Polymorphic Types in C [pdf] by phkahler on Thursday January 18, 2024 @12:23PM (#39044552)
That sounds like a someone else's problem. Find a platform that supports the language you need rather than try to make C into that language.

It is not C's job to be everything to everyone.

Re:Polymorphic Types in C [pdf] by sfpotter on Thursday January 18, 2024 @11:32AM (#39043821)
What is an example of an embedded systems project which truly benefits from a generic library in the way that you described?
Re:Polymorphic Types in C [pdf] by sigsev_251 on Thursday January 18, 2024 @12:31PM (#39044672)
Aviation would be my personal experience. We have to implement services on the aircraft for structured communication support with the ground tower. Those would really benefit from something like that, since we wouldn't have to implement a backend for every project and we could simply reuse the whole library everywhere.
Re:Polymorphic Types in C [pdf] by sfpotter on Thursday January 18, 2024 @12:51PM (#39044938)
I don’t see how generic programming (a la polymorphic types as presented) is the only or even the best solution to this problem.