3 ms·
Yes, references have nice constraints that makes them harder to misuse than pointers. The gap however is smaller than it first look: dangling references are sti
by loup-vaillant 5y ago
Yes, references have nice constraints that makes them harder to misuse than pointers. The gap however is smaller than it first look: dangling references are still a thing, and one does not simply make pointer arithmetic by accident. Don't get me wrong, I do like references enough that my C++ code is littered with them. I'm just saying they don't add that much to the table. They're nice, but I never really miss them when I write C.
Yes, writing your own virtual table in C is mighty cumbersome. On the other hand, I need those about once every 3 years, even in C++.
- bicolao 5y ago> one does not simply make pointer arithmetic by accident I'm not sure about that. This has bitten me a few times (in more complicated form) "hello " + 12