←back to thread

452 points birdculture | 5 comments | | HN request time: 0s | source
Show context
mdwhatcott ◴[] No.43979711[source]
[flagged]
replies(13): >>43979747 #>>43980029 #>>43980452 #>>43980582 #>>43980897 #>>43981065 #>>43981118 #>>43981329 #>>43981636 #>>43981787 #>>43981862 #>>43982909 #>>43992716 #
bsder ◴[] No.43981329[source]
> If a language needs an article like this, absolutely begging people to bite the bullet to learn it, maybe that's a language design smell.

The problem with articles like this is that they don't really get to the heart of the problem:

There are programs that Rust will simply not let you write.

Rust has good reasons for this. However, this is fundamentally different from practically every programming language that people have likely used before where you can write the most egregious glop and get it to compile and sometimes even kinda-sorta run. You, as a programmer, have to make peace with not being able to write certain types of programs, or Rust is not your huckleberry.

replies(2): >>43982704 #>>43983778 #
swiftcoder ◴[] No.43982704[source]
> There are programs that Rust will simply not let you write.

Can you specify a few of these programs?

I can see where Rust might not allow you to write something the way you want to, but I fail to see how a program would not be expressible in rust...

replies(1): >>43984589 #
1. steveklabnik ◴[] No.43984589[source]
They mean in Safe Rust. Unsafe is included in Rust for this reason.
replies(1): >>43985098 #
2. swiftcoder ◴[] No.43985098[source]
Is safe rust not Turing complete? I can see the argument that a purist "safe rust only" program might be slow, but it still will be expressible
replies(1): >>43985237 #
3. steveklabnik ◴[] No.43985237[source]
Turning completeness doesn’t take efficiency into account, nor the reality of things like “call into the operating system so that you can display output” that are necessary when building real systems.
replies(1): >>43986479 #
4. swiftcoder ◴[] No.43986479{3}[source]
With respect, I think that's moving the goalposts. If we have defined out of existence all forms of I/O, then what are we actually discussing?
replies(1): >>43986672 #
5. steveklabnik ◴[] No.43986672{4}[source]
We haven't, that's why Turing completeness is not relevant for the question at hand.

I can implement the non-IO parts of Brainfuck with safe Rust, so it is Turing Complete. That doesn't change the fact that there are useful programs not expressible in it.