@Manishearth is pass by reference not just sugar for passing a pointer and derefing it every time you access it?
-
-
Replying to @withoutboats
On the metal, yes, but this is about semantics.
1 reply 0 retweets 0 likes -
Replying to @ManishEarth @withoutboats
hallmark of PBV is that swap(a, b) can work without addl annotations
2 replies 0 retweets 0 likes -
Replying to @ManishEarth
but thats just because its sugar for swap(*a, *b)
1 reply 0 retweets 0 likes -
Replying to @withoutboats @ManishEarth
i see why you'd want this feature to make sure you dont mess with the ptr address, but you dont need new semantic concepts
1 reply 0 retweets 0 likes -
Replying to @withoutboats
This is sort of my point. In C++ it gets taught as a new concept and thoroughly confuses folks when they learn pointers next.
2 replies 0 retweets 0 likes -
Replying to @ManishEarth
Right, I agree. When I say "pass by reference" I mean "pass a pointer" :-)
2 replies 0 retweets 1 like
Replying to @withoutboats @ManishEarth
generally speaking, "pass by reference" is a flame war topic that confuses everyone except the smart alecs ;)
3:40 AM - 2 Feb 2017
0 replies
0 retweets
2 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.