3 ms·
> It's one of C's main strengths that it allows abstract data types so easily. On the contrary, data type abstraction in C is a pain. This was one of the reaso
by Koshkin 9y ago
> It's one of C's main strengths that it allows abstract data types so easily.
On the contrary, data type abstraction in C is a pain. This was one of the reasons for creation of "C with classes" (a.k.a. C++).
- catnaroek 9y agoNot that C++ is particularly good at data abstraction either.
- ASalazarMX 9y agoI prefer to call it "C Gone Wild".
- dangerbird2 9y agoThe only things that are particularly painful about opaque types in C is that you can't easily use stack-based memory to allocate opaque objects. This of course is true for C++ opaque types, but people tend to rely on private fields of concrete types instead of "PIMPL" struct declarations, even though the latter is arguably better for binary compatability and information hiding.