4 ms·
But you can't add 2 void pointers and seamlessly get integer addition if they point at integers or concatenation if they point at strings. (You could build you
by quietbritishjim 1y ago
But you can't add 2 void pointers and seamlessly get integer addition if they point at integers or concatenation if they point at strings.
(You could build your own custom data types that have type metadata in a shared header and an addition function that uses it, but then you're building your own custom language on top which isn't really the same thing.)
So yes C really does restrict you in some ways that Javascript doesn't.
- dgfitz 1y agoThat wasn't the constraint I was responding to, you moved the goalposts! :)