Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> C uses pointer casts all over the place to fake generics.

by "C" do you mean users of C? because most of the C code I write I don't use those sorts of techniques; instead I just use the preprocessor to make scuffed generics.[1] Unless you mean in libc itself, where I don't recall any use of pointer casts like that? If I'm missing something, please enlighten me.

[1] see my (probably terrible) dynamic array implementation, for example: https://git.sr.ht/~thezipcreator/xstd/tree/main/item/src/xst...





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: