Hi Maybe I should introduce myself first. I am Arne a Computer Science student and my bachelor degree is not far away anymore. I am very interested in new programming languages and lately I found out about Rust. Because of the fact, that in the last time my most used language is Scala I was kind of interested weather there is something that behaves to C++ similar as Scala behaves to Java. And rust seems in my opinion to be tho closest to Scala. Now I would like to share my experience with Scala, so that Rust can make things right, that were also right in Scala. Normally I really prefer Forums and other less direct forms of communication to introduce my Suggestions, because then more people are able to read them, but Rust doesn't have an official discussion forum (I would really like that).
First of all, generic Types with angle brackets. We all know generic types from C++, Java, C# etc, and they all use angle brackets for generic types. at least they call it angle brackets, but in fact they are the less and greater sign <> angle brackets are these ⟨⟩. This leads to many probles if you also want to use the < sign as an actual less sign. We all know that in C++ it was long time not possible to have >> as two closing angle brackets of templates, because it was parsed as a right shift operator. And there are a lot of ambiguous situations, for example if you want to use < within generic types (Scala does if for definition of inheritance ). html forbids to use <,> at all. The D programming language had an article about it, but I cant find it anymore. Scala uses those [] (array index is with normal braces ()). Afer a little while were it was different to me, I really liked it, because they are real brackets. I would really like to see those brackets it Rust. The second suggestion is concerning tho #fmt macro. #fmt works like printf, but its string is parsed at compile time, so that errors might be thrown when the string is incorrect. So when you unwind this format string at compile time, you know also all variable names and their types from scope. So it might be more natural to directly import variable names from the scope inside of the String, like it is done in many scripting languages. This is also done in tho Programming language Nemerle. Arne _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
