Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
uecker
1y ago
0 comments
Share
This is the point of void*, one does not have to use it.
0 comments
default
newest
oldest
glouwbug
1y ago
void* malloc(size_t size);
void free(void *ptr);
You use it a lot more than you think ;)
uecker
OP
1y ago
This is not a type safety issue though. For malloc the size has to agree. But in any case, you could wrap it into type-aware allocation demonstrating that this is not a limitation of the type system.
j
/
k
navigate · click thread line to collapse