Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Not really though. Local variables are the *one* use case where liberal type inference is not a bad thing. In every other case you have to provide types in Rust (which is good)
-
Eh?
Since when has JS a vector?
Or typing?
And let has an entire different meaning in JavaScript. -
Why did rust took over the concept of a vector from C++?
The name is so weird because I associate it with mathematical vectors as points or directions in a space.
But rust vectors are more like lists or arrays. -
KenyanDux273yUsing let in javascript gives a mutable object. Here using let implicitly means it's not mutable. You have to explicitly state it's mutable by using the mut keyword. So no it's not Javascript.
-
@Lensflare mathematicians.... Pft.
They cried in Java, they cried in C++...
They cry in Rust.
Let them SUFFER. *mwah hahahah* -
@lbfalvy I doubt that. What makes a vector in mathematics is that there are specific operations that can be applied to them. Like adding or forming a dot product.
Take a complex number for example. It’s not just a tuple of 2 numbers. Similarly, a vector is not just a list of numbers. -
@Lensflare Well yeah, but a key property of linear vector spaces is that they can be defined over rings (I think? My algebra is rusty) with a set number of bases which doesn't change. This implies an integer dimensionality for a given space and a natural representation of any vector in it using the real coefficients of a chosen (perfectly arbitrary) set of bases. It's not how they're defined but it's very fundamental to what makes linear vector spaces.
Related Rants
Rust is JavaScript, confirmed.
random
rust