« first day (1930 days earlier)      last day (1552 days later) » 

12:10 PM
-1
Q: How to access rust variables outside the scope?

EkaMy code look like this fn main(){ // some other codes goes here let int=1; if int==1{ let x="yes"; }else{ let x="no"; } if x=="yes"{ // some other codes goes here println!("yes"); }else if x=="no"{ // some other codes goes here ...

8k 8 fucking k
so that what too many python means
 
 
2 hours later…
2:07 PM
@Stargateur Funny, that problem was almost exactly covered in the rust book.
 
2:32 PM
"extern crate argparse; 2018 Rust edition doesn't require this." What does this mean: is extern crate no longer necessary or is argparse now in rust 2018?
 
2:42 PM
@9716278 extern crate
Where did you see that?
 
@Stargateur :48428700 thanks
 
3:46 PM
Is it wrong to think of variables in Rust when compared to C as always having the const keyword unless mut is used?
 
@9716278 that totally that
most language have mut as default rust choice const as default
and everyone like it
 
4:21 PM
@9716278 it’s not completely accurate, but it’s a good place to start and will probably be fine
 
 
2 hours later…
6:03 PM
Thank you, both of you. I'm actually coming from Rust going to C. A lot of the project I need to work with are C, but Rust is much more readable so I have a preference for it.
 
 
5 hours later…
10:50 PM
@mcarton you close for a wrong duplicate
the duplicate is from 2015, the code in it now compile
 

« first day (1930 days earlier)      last day (1552 days later) »