Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

The articles makes a good a case of how Rust can look as clean as other high-level programming languages when writing high-level business logic.


sort by: page size:

Rust also shines when it comes to high level abstractions. This is what attracts me to the language: as in C++, it covers the super low-level stuff, but it also powerful in business logic abstractions.

Rust is also very good for correctness for a lot of the same reasons as Haskell.

Zero cost abstractions are a great thing. Rust is working towards this. Readability and speed is a great goal and there is no reason to believe it cannot be achieved.

Rust has ruthless focus on practicality while having features that are old in academia, but new/niche in systems programming. I think it's remarkable that it's a language that both C and Haskell programmers can tolerate.

It reflects on the suitability of Rust as a systems programming language.

Is it just me, or does Rust code always seem very clean and tidy? I haven't seen a Rust project yet where the code seemed "ugly".

It's such a pleasure to look at compared to C++ (though nested generics are still a pain).


Yeah it's not the best analogy, but I think the rest of the idea still stands. I don't think a person looking at a language and thinking that it could be their silver bullet discredits their analysis, and Rust in particularly does seem well suited for that possibility with it's ability to address both low-level and high level programming.

A richer type system is not in opposition to good tooling, quite the opposite. Rust's strong type system enables fantastic static analysis, which, for example, obviates the need for anything like Go's data race detector.

The syntax is a lot more readable than rust, or C++.

And the philosophy of Rust is, what if we encoded that "care" into the language itself? That, to me, is a clear win. It is, to me, good systems language design: codifying decades of hard earned "best practices" into the language semantics itself.

I don't think Rust is messy in the same way Perl is simply because nobody has written a formal specification.

> Systems languages need to have lots of detail you just don't need in higher level languages like Haskell or Python

True, but Rust is being used for a lot more than just system programming, judging from all the "{ARBITRARY_PROGRAM} written in Rust" posts here on HN.


Compared to most popular high level languages like Java or Go, Rust is seriously at the more expressive end (read: can be higher level).

IMO The author proved here that Rust could have a much better syntax, when they showed the CrabML example.

Even though Rust has manual memory management, I'd say it can be pretty high level due to its functional programming features that are nearly equivalent to Haskell or OCaml.

Rust is a very well designed language no doubt, but I think maintenance is where high level languages have an upper hand in some domains.

Also, there are plenty of high level languages with traits, eg Haskell, but if you prefer one where it is easier to express things optionally with an imperative/OOP mindset, Scala.


Rust also provides a lot of tools that make it easier to avoid logic bugs, like algebraic data types.

Rust isn't only great because it's low level. Things like sum types (called enums in rust), pattern matching and expression orientation mean that it is often much more expressive than other languages for high level code.

When I read descriptions like yours, Rust sounds like the language delivering on the promises of Haskell in the Real World.
next

Legal | privacy