@wycats You mention that borrowed refs are the default when writing a function. I wonder why thats not the default case then, no & needed
@evanphx also, simple values make sense to by-value in Rust. Integers are still common ;)
-
-
@wycats Yeah. That's a place where you want by-value. I've considered a lang where type defined what the "sigil-less" meaning was. -
@evanphx but having sigil-less sometimes mean by-val and sometimes by-ref seems skeeery. -
@wycats Yeah, I agree it too easily confuses the programmer. -
@evanphx interestingly, I have definitely found myself forming an intuition for "value types" after a while. -
@wycats Oh yeah, thats common in all langs with them. I do the same in C++ and Go. -
@evanphx makes sense. Harder to form the intuition in Ruby/JS/Java because "reference all the things" is a dictate. -
@wycats Yeah, even for things you want to be a Value, like a Pathname. -
@evanphx I'm Rust, Path is actually not Copy because it has a heap allocated string in it. Aliasing is disallowed so things are a bit diff. - 10 more replies
New conversation -
-
-
@wycats So things like ints, etc were by-value, but a container was by-refThanks. Twitter will use this to make your timeline better. UndoUndo
-
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.