|
|
|
|
|
by dpark
1 day ago
|
|
You’re really citing a mess in a Ruby code base caused by lack of typing as evidence for why void * is problematic in C/C++? These are so wildly different cases that the comparison isn’t meaningful. This is like saying you should wear a helmet while playing tennis because sometimes helmets save bicyclists lives. |
|
If you read GP's post you'll understand it exemplifies exactly the issue that the likes of (void *) present in C.
I mean, read the message, particularly this:
> later on it's not that easy to understand which shape it should have in the specific conditional branch you're trying to fix
That is exactly the purpose of void *. By design. It's a pointer to an unspecified type. The unspecified type is exactly why this thing is used.