The reason for using :: instead of . for paths is because the Rust developers did not want to conflate path lookup and field lookup, which would obscure the runtime costs of indirection. (This is also the same reason why you can't omit the parens when calling a method with no arguments: a field lookup and a method call have wildly different runtime costs.)
Good to know the reasoning behind ::.
Waiting for Rust 1.0, after it gets released it's Scala for JVM and Rust for everything else (except Qt) :P
(a big issue with []-generics is that they're easy to confuse with indexing/slicing to a human. <> may look noisy, but it's harder to confuse it with comparisons)
- Qt core (QList, QMap) can be replaced with Rust std lib
- I don't use QML and Javascript (because Javascript errors don't show up at compile time)
- The only thing missing from Rust is QWidgets, but I'm sure there will be something to replace it
I wouldn't like to use a Rust port of Qt just to get QWidgets for Rust, because it would also mean shipping huge Qt core libraries with my Windows application. I don't need them so I don't want to do that.
QML is the way forward for making GUI apps, you are not supposed to use javascript much (although you can make complete apps with it). You are supposed to have your complex logic in a C++ backend which interacts with the QML frontend.
Maybe QML will have Rust bindings.
Though apparently this couldn't be used in Rust, since they want both traits for indexing ( [] ) and calling like a function ( () ) on types that implement those respective traits.
Don't worry, once Rust has established a foothold here, then we can start designing the pretty language that will usurp it. :)
Using :: to indicate a submodule has tons and tons of precedent. The only prominent example I can think of is PHP, and there was a ton of outrage when it didn't use ::.
The reason for the proposal was that (.) for function composition made the grammar more complex or problematic because of the accessing 'operator' (.), and/or something that had to do with more fancy accessing and such (lenses?).
Theoretically it's solvable by requiring whitespace to surround all arithmetic operators, which is actually a bit of an intriguing proposition because it would then also allow you to use dashes in variable names and have it be unambiguous, i.e. `foo-bar/qux - baz / spam` would unambiguously mean "divide baz by spam, then subtract it from qux in the foo-bar namespace". But nearly all languages try to avoid this sort of whitespace dependence (look at the ancient furor over the `> >` requirement in C++), and it would be quite a reach for Rust to start championing it now.