simple things
George Shuklin
1

I believe const is used for static constants, not for normal variables. So, you can’t type const a = b, unless b is also a constant.

self and Self are two different, but related things, and I don’t see why they shouldn’t be called as they are. I’ll leave it at that until you get to the traits chapter. :)

I feel myself a bit disappointed by lack of true integers

While it works in Python, it would break the conventions of Rust. A long integer may have to be stored in heap and all the operations on heap in Rust are explicit.

Istead oflet x: f64 = 1; you can write let x = 1 as f64 and it will work, because it is an explicit cast.

The error that you got when you tried to print a tuple seems reasonable. As it says, just replace {} in the template by {:?}, and it will work.

Rust doesn’t have default values for function arguments. That would require passing named parameters like f(a=2, b=3), but I don’t see why it can’t be done in future. On the other hand, Rust doesn’t do function overloading because it would iterfere with type inference.

Like what you read? Give Oleg Eterevsky a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.