3 ms·
How much cognitive overhead is it to think about ownership all the time once you get used to it ? Coming from a GC-languages background I had a hard time thinki
by zimbatm 12y ago
How much cognitive overhead is it to think about ownership all the time once you get used to it ? Coming from a GC-languages background I had a hard time thinking in those terms last time I played with it. I ended up having .clone() littered all over the place :)
- pcwalton 12y agoI find that it's no more mental overhead than it is in C. The nice thing is that the development cycle ends up being faster than C for me because I don't have to spend as much time in front of the debugger.
- deleted 12y ago[deleted]
- chrismorgan 12y agoI don’t find that I need to think about it often at all. And very often I can get away with thinking about it less than I should, because if I make a mistake, the compiler will pull me up short. ☺ When writing libraries, you will typically need to think about ownership more frequently than when writing applications, but it’s normally not at all problematic.
- aidenn0 12y agoWriting libraries you need to think about it a lot it really informs the choices for datastructures you make. Other than that, it's considerably easier than other non-managed languages (e.g. C, C++, Pascal)