Hacker News new | past | comments | ask | show | jobs | submit login

Rust is very middle of the road when it comes to using weird symbols all over the place. Just take a look at some C++ or Objective C code...

I think this is more a problem with what you're used to. You see the same criticisms of every language: Basic dialects are too wordy, Lisp dialects too bracketty, C dialects too symbolly, etc. etc. It's hardly the measure of a language.




Learning Python on the side right now and I can’t help but add {} or ;’s all over the place. I have to stop my self a lot. Coming from JavaScript (and a little java) myself it’s much more pleasant to use Python. You mean I can just indent a function?

Java was the language I learned during CS101 in school and I always hated the “don’t worry about this part right now just write static main void... or the equivalent”. Python code is cleaner too look at but Java has it’s reasons for the verbosity.


until you realize that you can't do multi-line lambdas because whitespace sensitive languages are awful. Note how no new language chooses to follow this nonsense.

The braces allow you to be explicit with what you want. Rust's {} are a feature. They let you see exactly which scope you're in. With Rust's memory management, you then know exactly when a variable will go out of scope and be cleaned up.


I’ll have to remember that for later use. The reason I am learning Python is to setup some home automation using Raspberry Pis and a flask based api/app to complement the data they collect.

You peaked my interest. Guido van Rossum on the subject:

> But the complexity of any proposed solution for this puzzle is immense, to me: it requires the parser (or more precisely, the lexer) to be able to switch back and forth between indent-sensitive and indent-insensitive modes, keeping a stack of previous modes and indentation level. Technically that can all be solved (there's already a stack of indentation levels that could be generalized). But none of that takes away my gut feeling that it is all an elaborate Rube Goldberg contraption.

https://www.artima.com/weblogs/viewpost.jsp?thread=147358

As a side note, there are more than 100x the number of jobs with Python in the description vs rust. Out of the 30 or so jobs with Rust in the description most are for automotive techs.


> As a side note, there are more than 100x the number of jobs with Python in the description vs rust. Out of the 30 or so jobs with Rust in the description most are for automotive techs.

Rust 1.0 was released May 2015 [1]

Python 1.0 was released January 1994 [2]

That's over 21 years that Python has had a chance to work its way into the industry and into almost every field imaginable. I'd wager that many careers have revolved around the Python language at this point.

Rust is just getting started. The volume of press is the first sign that it's about to take off. It can take years for existing enterprises to approve a new language for use. Give it time.

[1] https://blog.rust-lang.org/2015/05/15/Rust-1.0.html

[2] https://en.wikipedia.org/wiki/History_of_Python#Version_1


> you can't do multi-line lambdas because whitespace sensitive languages are awful.

like Haskell ?


Unrelated to whitespace sensitivity but modern languages choose to make semicolons optionals. E.g: Kotlin, swift, go that adds to the list (js,python, ruby, etc)


Other than block syntax... how's ObjC bad? It's verbose, I'll grant you that, but I wouldn't lump it in with a language that's enforcing lifetimes and what not.


It's really not middle of the road. I wrote both Objective-C and C++, and both (C++ templated code aside) are more readable than Rust.

Objective-C in particular was verbose, but the symbols made sense and their meaning could be understood from the context. In Rust you either know what the symbols mean, or you do not understand the code.


Most of the symbols used in Rust are used for the same thing as they are in the C family of languages. And if you don't recognize them, https://doc.rust-lang.org/stable/book/appendix-02-operators.... is there to help.


> In Rust you either know what the symbols mean, or you do not understand the code.

This is just part of knowing a programming language. Readability to people who don't know a programming language might be considered an interesting property in itself, perhaps especially for cognitive psychology or education, but it has little to do with programming. It's only accidentally related to a concept of 'readability' relevant to software development.



The blocks extension adds one extra symbol. Same deal with syntax applies as with function pointers in plain C.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: