3 ms·
> At least, C can fit in a brain. A typical programmer's mental model of C can fit in a brain. Actual C is every bit as complex and nuanced as C++; it just has
by sjolsen 12y ago
> At least, C can fit in a brain.
A typical programmer's mental model of C can fit in a brain. Actual C is every bit as complex and nuanced as C++; it just has a narrower scope. I mean, C++ may be crazy, but don't pretend a language where
uint64_t foo = 1 << 48;
has undefined behaviour,
int a [3];
declares an array while
void foo (int a [3]);
declares a function taking a pointer, and polymorphism is achieved by erasing all types and parsing a string at run time to figure out where to pull stuff off the stack:
printf ("%d%s\n", 3.0, " s"); // Whoops, "%d" doesn't mean "double." It's a shame I don't have a type system for catching that sort of error.
is anything remotely resembling sane.
- JoeAltmaier 12y agoPretty crazy; but C++ has extra crazy all its own, so it wins the crazy contest.
- sjolsen 12y agoI won't contest that! But C is crazy enough that suggesting it as an alternative to C++ because C++ is crazy is, well, crazy. If you can handle the crazy of C, you can probably handle C++, because the crazy specific to C++ usually at least converges to reasonable behaviour. I mean, you'll drive yourself nuts trying to wrap your head entirely around either language, so you may as well at least mentally approximate the one that gives you basic type-parameterization.