indentation instead of semicolons and quotes

I’m currently learning Rust through rustlings. After completing one task, I asked myself a question. Does Rust plan to continue pushing its message of accessibility, understandability, simplicity, and zero-cost abstractions? What I mean.
After completing some task, I saw the following code I wrote.

It seems that we have practically no semicolons and quotation marks here. It is clear that quotation marks and semicolons separate our lines of code into logical steps. However, I was surprised that my code compiled with a minimum number of these logical symbols.
I would like to immediately note that I am not an ardent opponent of Rust syntax. It would seem that if you don’t like it, write in Python. Here is an interesting moment in the development of Rust. With the release of new versions, Rust seems to be becoming simpler and simpler in syntax, more and more understandable. It seems to be trying to syntactically disassociate itself from the syntax of C/C++, in which any operations are defined at a very low level, which prompted the creation of high-level languages ​​- Java, Python, and so on. However, Rust, as I see it, takes this problem into account and adds convenient abstractions, so I like to write in it like in Python. How wonderful the for loop is 🙂
However, why am I picking on these semicolons and quotes at the end? This is not interpreted Python. However, Rust allows you not to write this at the end and in the loop, which is already hinting – hey, this is not C, I use what fits in my head and go through the loop as simply as possible.
And so I wanted to ask the Rust guru programmers, who also wrote in other languages ​​before, for example Python. Do I understand correctly that Rust could ideally go over indents like Python???
What’s the question? Well, look, what’s stopping me as a programmer from writing all my Rust code in one line? It’s okay, and the code will compile. Unless the developer next to me just stops working with me. It would be cool to add this strictness at the language level, not the style checker.
What does this give us? Strictness, structure, clarity, compactness, uncompromisingness, and less code. After all, everyone already knows that code is read more than written.
Why should you even care about this? Well, look, anyone who studied Python programming from Mark Lutz’s books Learn Python and Programming in Python will understand. Namely, he writes that
He is tired of writing the same thing every time to do a simple thing
A large code in C and even a small part of it simply does not fit in the head because each operation, function in which primitive logic occurs is written in a bunch of lines of code
Also, these semicolons and {} just clutter the code and make it already smeared
There were many comparisons with other languages ​​and other reasons why you need to learn Python. Of course, I could have messed up something or left something out. Correct me if anyone readed Mark Lutz’s books Learn Python and Programming in Python .
And I repeat, Rust is trying not to classify itself as C and does everything possible from the best practices of languages ​​by adding zero-cost abstractions, automatic dereferencing of pointers, automatic type detection based on the passed argument (let num = 1;) and so on.
I liked this post where the author of the comment discusses the need and compromises when adding generators to Rust. And indeed, generators are necessary, they are very simple in the mind and their implementation is very non-trivial.

Comment
byu/desiringmachines from discussion
inrust


And each such innovation makes Rust simply beyond competition for system programming and even web programming with extreme loads, because it is compiled and written just like Python.
I have a rough idea of ​​what Rust developers must go through to satisfy the needs they have set their sights on (simplicity, performance, security, some kind of hybrid of Python and C++). I understand that all this is complex and ambiguous and it is easier to change nothing at all and write in Golang without generics and if error else. However, I think Rust has a very big potential to become a second language to help Python, besides Python itself of course.
And still, what do you think – is changing the syntax to indents like Python in theory better than the existing syntax in the long term or not and why?

fn vec_loop(input: &[i32]) -> Vec<i32> {
    let mut output = Vec::new();

    for element in input {
        output.push(2 * element)
    }

    return output
}

New contributor

user26560400 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật