Live data from Hacker News

Tell HN: Rust Is Complex

news.ycombinator.com

11–20 of 102 posts

Re: Tell HN: Rust Is Complex

#11
Go and rust are actually not that far away from each other on the logarithmic scale of complexity.

I recommend that you broaden your horizons by studying something really complex like Haskell and something really simple and stripped down like Lua.

Re: Tell HN: Rust Is Complex

#12
there is no horror in c++. it is a better investment of your time IMHO to learn patterns and best practices and learn how things work at a low level instead of learning a language like rust which attempts to hide difficult work from you and make your life easier. in the end you will pay for that when you finally understand there are no shortcuts and you really need to understand how the machine, memory management and operating systems work. rust cannot fill that void.

Re: Tell HN: Rust Is Complex

#13

Question: How much of Rust’s type system complexity is due to async? It seems Pin is mostly related to async and the official examples for GAT are for async. Given the complexities of async and how other alternatives such a Java Loom’s virtual threads, in about 10 years I am not sure that we won’t see Rust going all in on async as a mistake.

Yes, I think async is where a lot of the complexity comes in.

Re: Tell HN: Rust Is Complex

#14
post #12

there is no horror in c++. it is a better investment of your time IMHO to learn patterns and best practices and learn how things work at a low level instead of learning a language like rust which attempts to hide difficult work from you and make your life easier. in the end you will pay for that when you finally understand there are no shortcuts and you really need to understand how the machine, memory management and…

Rust is a systems language, like C++. I don't think your comparison is fair. Also I've done a lot of C++ programming over the years, and I won't willingly go back to that. It is a horror in my opinion.

Re: Tell HN: Rust Is Complex

#15
post #11

Go and rust are actually not that far away from each other on the logarithmic scale of complexity. I recommend that you broaden your horizons by studying something really complex like Haskell and something really simple and stripped down like Lua.

I've used Lua, it's nice and simple like Go.

I tried Haskell, but I found it unreasonably complex to be practical. I only learn programming languages if I have a practical reason to use them, so I never picked it up again. Perhaps you have a point, everything is relative.

Re: Tell HN: Rust Is Complex

#16
post #9

Cherry picking an instance of complexity is not a particularly fair way to judge a language. It would be like explaining how to encode the lambda calculus in C++ templates and then claiming C++ is too complex. As far as I have read, Pin has never been a satisfactory thing but a necessary one. Even recently Rust has been trying to decide how to really handle unsafe mutable pointers in a way that COULD be safe. I'm sur…

Yes, it's not a fair comparison. More like a wake-up call. Rust can get pretty complex. Especially if you're using async and then you need pin.

Like c++, languages that strive for zero cost abstraction seem to put a large cost burden on the developer in understanding it.

Re: Tell HN: Rust Is Complex

#17

Earlier quoted context omitted.

Do you have more examples? I’ll admit that Go is full of weird quirks, but nothing feels bolted on. Generics were agonized over for so long because they had to fit it within the existing language

Here’s one: The fact that contexts are used extensively in the standard library but that there’s still no way to cancel a write to an io.Writer. The only way to “cancel” a write on a TCP socket is to set the socket’s “deadline” to some time in the past from another goroutine.

Agreed on that one. Contexts definitely feel bolted on and unnatural. The sql libs for example all have 'Do' and 'DoContext', where 'Do' is any one of the operations you'd typically use.

Re: Tell HN: Rust Is Complex

#18
post #15
post #11

Go and rust are actually not that far away from each other on the logarithmic scale of complexity. I recommend that you broaden your horizons by studying something really complex like Haskell and something really simple and stripped down like Lua.

I've used Lua, it's nice and simple like Go. I tried Haskell, but I found it unreasonably complex to be practical. I only learn programming languages if I have a practical reason to use them, so I never picked it up again. Perhaps you have a point, everything is relative.

Try writing a programming language with Haskell. Learning Haskell changed the way I view things and most other languages feel cumbersome in comparison.

There’s something almost magical about writing software in a language like Haskell, when you have defined good and elegant abstractions, it’s as if you peer into the matrix and touch the divine.. so to speak.

Re: Tell HN: Rust Is Complex

#19

Complexity is relative. Go is a language for high-level application development. It has a runtime, garbage collection, and a sophisticated M:N threading scheduler that are all designed to help the programmer express themselves in terms of the problem domain. It competes with Java, C#, and (in some cases) Python or Ruby. Rust is a language for low-level systems programming. It needs far more complexity than Go because…

The issue with Go is it's a "worse is better" situation: it's easy to go from 0 to a limited amount of productivity, but then it peaks because of the impractical and unreasonable design limitations due to absurd governance decisions. It's too minimal and too limited in key ways out of design purity.

Rust's syntax and verbosity sometimes leaves much to be desired or the convoluted syntax and structures to get interior mutability, but it doesn't matter because of its immense power in the spirits of say ML, Haskell, or C#. Rust can do a lot of what they do and a lot more, and safer. Pony and Idris are barely used but have features Rust doesn't have.

I think too many people poo-poo Rust because they either don't want to understand it or can't grasp its concepts like lifetimes (liveness) or move. It's easy to dismiss what one doesn't understand and stake a claim with an irrational, tribal ego opinion rather than consider the alternatives in the programming toolbox for a given purpose.

Re: Tell HN: Rust Is Complex

#20
post #14
post #12

there is no horror in c++. it is a better investment of your time IMHO to learn patterns and best practices and learn how things work at a low level instead of learning a language like rust which attempts to hide difficult work from you and make your life easier. in the end you will pay for that when you finally understand there are no shortcuts and you really need to understand how the machine, memory management and…

Rust is a systems language, like C++. I don't think your comparison is fair. Also I've done a lot of C++ programming over the years, and I won't willingly go back to that. It is a horror in my opinion.

The selling point of Rust is that it hides complexity from you and gives you "safe" memory management. That comes at a price.
Post reply on HN