TWiR quote of the week

"A language that doesn't affect the way you think about programming, is not worth knowing." -- Alan J. Perlis, Epigrams on Programming

10 Likes

I think this is the opposite: a language that does affect how you think about programming is a language that fails to be intuitive (that shows as a steep learning curve). This is a disadvantage of Rust, one that I accept because I know there is no other way.

I've seen similar sentiments echoed before, elsewhere. The point it's making is the same one that's argued whenever people say you should learn LISP because it'll make you a better programmer.

There's no such thing as a perfectly intuitive programming language because algorithmic thinking isn't something that comes to us intuitively. That's why the first language is always the hardest.

It's helpful and mind-expanding to learn new paradigms and force yourself out of old cognitive ruts. Thus, from an "improving your ability to solve problems and function as a programmer" perspective, what makes Rust difficult is valuable because it's forcing you to learn to think about problems in new ways.

That's the distinction between necessary complexity and complexity due to ill-considered design. (Similar to how, in video games, there's a difference between genuine difficulty and difficulty caused by something like a crappy control scheme.)

25 Likes

I'd like to nominate @ssokolow's reply.

11 Likes

Another epigram from the source @glyn mentioned:

In a 5 year period we get one superb programming language. Only we can't control when the 5 year period will begin.

Alan J. Perlis, Epigrams on Programming, 1982

The prophecy fulfilled.

10 Likes

Why Rust mutexes look like they do - Cliffle

Relying on the programmer to always read, comprehend, and remember the documentation – and then do everything right, every time – is how we get bugs.

15 Likes

The Tower of Weakenings: Memory Models For Everyone - Faultlore

13 Likes

To be honest, I don't think this is possible (people tend to not care about what allowed in C and just do it), but striving to get there will definitely make Rust pointers better.

I think you are misunderstanding the quote. The implication is that Rust makes it easier to use raw pointers correctly than C. Of course doing things with the "whatever happens to compile" mindset unfortunately burnt into most C users is mechanistically easier in C (sometimes) than the equivalent would be in Rust, but the result is often UB so by definition incorrect, meanwhile confidently knowing what's correct and guaranteed (and staying in guaranteed-safe land) is much easier in Rust.

7 Likes

:joy:

2 Likes

If you haven't tried Rust, just grab it and work through the first couple of chapters of the rust book and do something wrong. Because the error messages in Rust is like a hug from the compiler.
"You did your best, yes, yeah. You see here, where you've done this ? No you can't do that, no it's bad. What you probably want to do is this."
It teaches you Rust. The compiler is lovely.

Mark Rendle - The Worst Programming Language Ever - Mark Rendle - NDC Oslo 2021 - YouTube

10 Likes

Self nominating:

rust is not hard, doing things right is hard. And because rust forces you to do things right, it feels like rust is hard. [...]

optionally, the full comment:

rust is not hard, doing things right is hard. And because rust forces you to do things right, it feels like rust is hard. I'd argue that other languages are even harder because the compiler does not tell you that you messed up, you have to think yourself. I use rust because I am too dump for the hard languages!

(source: musicmatze: "@pet84rik@osna.social rust is not hard, doing thi…" - Mastodon for Tech Folks)

17 Likes

:100:% this. I use Rust because I don't want to worry about my past self making stupid mistakes! :smiley:

9 Likes

Which I think captures the spirit of the forum quite well :slight_smile:

1 Like

Rendle’s language borrows nothing from Rust, “because Rust is very close to being the perfect language.” (As Rendle sees it, even Rust’s error messages are “like a hug from the compiler.”)

David Cassel referencing Mark Rendle in Comical Coder Envisions the Worst Programming Language Ever

I also feel like the compiler is hugging me.

4 Likes

This is the most fundamental philosophy of both the Rust language and the Rust project: we don't think it's sufficient to build robust systems by only including people who don't make mistakes; we think it's better to provide tooling and process to catch and prevent mistakes.

Jane Lusby, Inside Rust Blog - 19 April 2022

The post in general expresses well the openness of the Rust community to encourage people to participate instead of gatekeeping and insults you see in other communities.

17 Likes

Rust makes me feel like I can step into more areas of software that I was previously unfamiliar with

Source: https://twitter.com/chrisbiscardi/status/1518610355844382720

7 Likes

I really like to compare programming languages to types of parents.

Python - Rich parents that like to think that they care about you by throwing money at everything, you have all the possibilities but zero guidance and help when you have a problem. Overall it's okay but you get irritated by the lack of order. It's fun though if you want to go for all the rollercoaster rides around you.

C/C++ - Parents that do not care at all, you can do everything, they don't really care if you are alive or not. You might think that you are responsible and you will never do something bad but everyone fails once in a while(and then you are f*cked). When there's a problem your dad/mom drunkenly mumbles something you barely understand.

JavaScript - Your parents have good intentions but don't know what to do with a child at all, they come up with random rules that "WE FOLLOW" and make up reasons as they go, overall some of it makes sense but you are confused 90% of the time.

Rust - You feel that the parents are smarter than you almost all the time. They set up a bit limiting rules that sometimes annoy you (sometimes you even hate them) but then pretty much always when you actually think why they set up those limitations it is because they care about you and what you do. If you are brave enough you can tell them to close their eyes and only then you can do whatever you want, but you know that this should be used wisely.

-- IDontHaveNicknameToo @ https://www.reddit.com/r/rust/comments/uboyeq/why_is_rust_the_most_loved_programming_language/i66ixy2/

14 Likes

rust safety guarantees do not cover people eating the pizzas

Sahl#2307 on the community discord

3 Likes

"Ah but logic errors can happen with all languages" yes and I'm sure trains occasionally run into trees as well, but cars are way more likely to. :upside_down_face:

25 Likes