←back to thread

451 points birdculture | 1 comments | | HN request time: 0.239s | source
Show context
jillesvangurp ◴[] No.43981625[source]
Rust has a few big hurdles for new users:

- it's very different from other languages. That's intentional but also an obstacle.

- it's a very complex language with a very terse syntax that looks like people are typing with their elbows and are hitting random keys. A single character can completely change the meaning of a thing. And it doesn't help that a lot of this syntax deeply nested.

- a lot of its features are hard to understand without deeper understanding of the theory behind them. This adds to the complexity. The type system and the borrowing mechanism are good examples. Unless you are a type system nerd a lot of that is just gobblygook to the average Python or Javascript user. This also makes it a very inappropriate language for people that don't have a master degree in computer science. Which these days is most programmers.

- it has widely used macros that obfuscate a lot of things that further adds to the complexity. If you don't know the macro definitions, it just becomes harder to understand what is going on. All languages with macros suffer from this to some degree.

I think LLMs can help a lot here these days. When I last tried to wrap my head around Rust that wasn't an option yet. I might have another go at it at some time. But it's not a priority for me currently. But llms have definitely lowered the barrier for me to try new stuff. I definitely see the value of a language like users. But it doesn't really solve a problem I have with the languages I do use (kotlin, python, typescript, etc.). I've used most popular languages at some point in my life. Rust is unique in how difficult it is to learn.

replies(2): >>43983336 #>>43986202 #
greazy ◴[] No.43983336[source]
> it has widely used macros that obfuscate a lot of things that further adds to the complexity.

This is what's stumped me when learning Rust. It could be the resources I used, whixh introduced macros early on with no explanation.

replies(1): >>43984751 #
ModernMech ◴[] No.43984751[source]
Macros are introduced early in Rust for a couple reasons.

1. println!() is a macro, so if you want to print anything out you need to grapple with what that ! means, and why println needs to be a macro in Rust.

2. Macros are important in Rust, they're not a small or ancillary feature. They put a lot of work into the macro system, and all Rust devs should aspire to use and understand metaprogramming. It's not a language feature reserved for the upper echelon of internal Rust devs, but a feature everyone should get used to and use.

replies(2): >>43984780 #>>43985744 #
1. steveklabnik ◴[] No.43984780[source]
At the same time, you don’t need to author macros. I have basically never written one, for example.