4 ms·
Meh. What do you do with the dynamically allocated arrays then? Do you pass their dimensions alongside pointer? If that bothers you so much, you can create a st
by Drdrdrq 8y ago
Meh. What do you do with the dynamically allocated arrays then? Do you pass their dimensions alongside pointer? If that bothers you so much, you can create a struct that holds the pointer and metadata, and do the checks yourself. Calling this "C's biggest mistake" is a bit sensationalistic.
EDIT: besides, you should start new projects in Rust anyway, because it takes security to whole other level. C did a great job, but it's a bit old. :)
- adamnemecek 8y agoThe pattern is very present in all c code and rolling your own just causes paid when interacting with 3rd party code.
- PeCaN 8y ago>besides, you should start new projects in Rust anyway Thanks, I almost forgot what website I was on for a second.
- deleted 8y ago[deleted]
- Drdrdrq 8y agoNo problem - happened to me 6 hours ago too. </s>
- int_19h 8y ago> Do you pass their dimensions alongside pointer That is literally the meaning of "fat pointer", and the linked article even explains it.
- jibal 8y agoThe article explains why it's C's biggest mistke, and neither your nor anyone else has refuted it ... in fact, you don't even touch on it.