4 ms·
C: the language that can't even get a boolean type right. And that stuff was standardized by a committee? Wow.
by innguest 13y ago
C: the language that can't even get a boolean type right.
And that stuff was standardized by a committee? Wow.
- gizmo686 13y agoWhy should C get boolean write. As a language, it is very close to the hardware, and the hardware doesn't actually have the concept of a bit. The smallest unit that modern processors expose is a byte, so it makes sense that the smallest datatype C has is also a byte.
- innguest 13y agoNo need to define boolean in terms of a bit just because that's all it takes. There's no harm in being redundant and using a whole byte for it, so that -1 is true and 0 is false.
- noselasd 13y agoHardware certainly has the concept of a bit, otherwise it couldn't have bit operations, it doesn't have a data type that's a bit though, but it neither has structs or in some cases long longs or pointers. bool helps statically analyzers better as well.
- coldtea 13y ago>C: the language that can't even get a boolean type right. And that powers 99% of the software that matters. Name me one language that you cannot say similar BS about some aspect of it.
- nknighthb 13y agoBrainfuck!
- gaius 13y agoThere are 2 kinds of languages, my friend. Those people complain about, and those no one uses.
- NAFV_P 13y agoParaphrasing Bjarne Stroustrup.