11
james2k
214d

I'm doing a tiny project in c++ to teach myself, its infuriating. Forgot the pass-by-reference ampersand and spent a full hour trying to figure out why the program took so long...

Comments
  • 2
    Yeah, the cool kids nowadays call it "borrowing" for some reason.
  • 1
    @rantsauce that's because Rust uses that term. It has had to invent some words for the new concepts it introduced.
  • 1
    I still do not understand why references in C++ are a thing. They're doing the same thing as pointers, they have almost the exact same behavior except their syntax is different and obscures the fact that the function at hand has side effects.
Add Comment