Originally posted by marios
View Post
Originally posted by marios
View Post
You don't skip writing tests, only it is annoying and holds you back. Or even worse: ignore tests if they signal you've shot into your foot?
Originally posted by marios
View Post
Granted, the compiler will let you write stuff, which would not compile in rust. But from my experience, if you've to "fight the borrow checker" too much (as in: you've to do strange stuff that it compiles), you should reconsider your architecture anyway. And this is often a good thing. Better to learn that something is bullshit upfront than in production. It might take you a little longer to get something working to play with, but you save tears in the long run.
Originally posted by marios
View Post
Code:
const int32 a = 4;
Code:
let a = 4i32;
Code:
void main() { const int a[3] = {123, 456, 789}; const int N = sizeof(a)/sizeof(int); for (int i=0; i < N; i++) { printf("%i: %i", i, a[i]); } }
Code:
fn main() { let a = [123, 456, 789]; for (i, v) in a.iter().enumerate() { println!("{}: {}", i, v); } }
Originally posted by marios
View Post
Leave a comment: