4 ms·
Why did you retitle this with "... or why most C coders don't get OO"? I don't see the connection.
by ggchappell 15y ago
Why did you retitle this with "... or why most C coders don't get OO"? I don't see the connection.
- DiabloD3 15y agoBecause the (ab-)use of void* instead of struct typedef pointers mean they do not understand C is OO and typesafe. tl;dr: void* is a code smell.
- deleted 15y ago[deleted]
- kstenerud 15y agoWhere in that entire article is type void* even being used?
- lubutu 15y agoVoid pointers do have a purpose. Regardless, it's only about type safety, not being object-oriented, since C isn't.
- greyfade 15y agoThere are no void pointers in that example. At all. All of it builds off of `void( * )(int * )`, which is a pointer to a function taking a pointer to `int` and returning `void`.
- iptoc 15y agoWithout void * there would be no malloc(), calloc(), free(), qsort(), etc. More importantly, there is no void * in the article. Even more importantly, it's a "silly puzzle" as already mentioned in the article. How do you conclude from that C programmers who love such puzzles don't understand OO? That's a very unscientific thing to say.
- DiabloD3 15y agomalloc/calloc and free are the only legitimate outliers in my opinion. What I was getting at is that most C programmers simply do not understand programming at all and write utter trash. A lot of the stuff I've seen is failing to use type safety in C.
- lubutu 15y agoThe submitter also retitled "The Rise and Fall of Bitcoin" to "The rise and... rise of Bitcoin". He seems to like pushing some agenda. http://news.ycombinator.com/item?id=3275203 http://news.ycombinator.com/item?id=3275203
- Codayus 15y agoThere is no connection.