@wycats Semicolons
-
-
-
@sferik you mean vs Ruby-style rules? -
@wycats Isn’t there a thing in Rust where adding a semicolon to the end of an expression makes it not return a value? -
@sferik ah yes. No-semi == return value. This is sounding less like a pain point and more like "I bet it would be weird" it's slightly weird -
@wycats I’m sure I’d get use to it eventually but there’s a mental overhead of asking: “Does this line need a semicolon?” for each line. -
@sferik nah that isn't how you think of it. It's like saying there's a mental overhead of asking whether you need to return on each line.
End of conversation
New conversation -
-
-
@wycats I got very confused by lifetimes of struct members. -
@conradirwin yeah that's definitely when ownership and lending become the most abstract. A struct lives as long as it's shortest field. -
@wycats Yeah. I actually struggled with that "invertedness". It felt that the lifetime of a field should be due to the lifetime of a struct. -
@conradirwin but if you make a struct and toss in a bunch of values, it must not be used as soon as any contained value is returned right? -
@wycats It definitely makes sense once you understand, it was just a pain point for me playing with rust. (the lifetime docs don't cover it) -
@conradirwin yeah totally. Do@steveklabnik's new docs help?
End of conversation
New conversation -
-
-
-
@IvanUkhov yes! That's a mega paper cut
End of conversation
New conversation -
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.