News for hackers. Stuff that matters.
Re:Polymorphic Types in C [pdf] by sfpotter on Thursday January 18, 2024 @12:53PM (#39044965)
If you’re in a situation where you “truly need” type safe generic interfaces, why wouldn’t you just use a different language?

I don’t understand your second point.

Re:Polymorphic Types in C [pdf] by uecker on Thursday January 18, 2024 @01:32PM (#39045649)
The other point: For interoperability with other languages you often need to construct function calls at run-time. For this one needs to be able to describe types. Adding this by external libraries is always a pain because one has to carefully support the ABI of all supported architectures. A compiler can support this seamlessly. A _Typeof operator that returns a type that can be passed around and interrogated at run-time solves this in a very elegant and simple way.
Re:Polymorphic Types in C [pdf] by uecker on Thursday January 18, 2024 @01:27PM (#39045561)
There is no other languages with the same advantages as C and a good type system.
Re:Polymorphic Types in C [pdf] by trealira on Friday January 19, 2024 @03:40PM (#39060833)
What advantages do you have in mind? Why not just use C++, Ada, or Rust?