News for hackers. Stuff that matters.
Re:Conflating pointers with arrays: C's biggest mistake? (2009) by blub on Tuesday July 24, 2018 @05:37AM (#17599385)
I was making a point about language culture and decision making.

Conformance is a property of the code, the programmer's decision process is the really interesting thing here to me and I was arguing that such a solution is not unusual for C, but it would be for C++ , where a programmer would avoid it not because it's not conformant, but because it looks odd. pjmpl further clarified that it depends on the type of C++ programmer - I agree.

Re:Conflating pointers with arrays: C's biggest mistake? (2009) by jibal on Wednesday July 25, 2018 @02:48AM (#17607316)
Non conformant code doesn't become an idiom, because it's broken. If you want to wrap that in a cultural framework, go ahead, but it rather misses the point.

> I was arguing that such a solution is not unusual for C

You may have asserted that (funny how people call their unsupported assertions "arguments"), but you're wrong if so. Again, it's broken, in C just as much as C++. You wrote

> instead one would use hash functions for each type and in the case of a struct the individual members would be accessed to build the hash value.

But this is just as much true in C as C++, because hashing pad bytes is wrong. In fact, C programmers are probably more aware of this than C++ programmers.