02-09-09 - void pointer

Urg WTF why doesn't C++ let void * be implicitly cast to any other pointer type !? It's fucking void * obviously I'm using that because it's untyped or type-unknown so I'm going to be casting it. Forcing me to cast in situations like that where it's obvious just makes me more inclined to cast all the time without thinking about it, which is much worse.

Being too strict about enforcing stupid rules is very negative. It makes people ignore the rules. You need to complain only when it really matters.


Anonymous said...

That's the one thing I do in C all the time that never ports to C++... so I've been slowly getting in the habit of doing it the C++ way since everyone always wants to compile my libraries as C++...

MH said...

They should also just turn off the pointer aliasing optimization when you pass pointers through void* also.

old rants