←back to thread

451 points birdculture | 2 comments | | HN request time: 0s | source
Show context
GenshoTikamura ◴[] No.43982864[source]
> Stop resisting. That’s the most important lesson

> Accept that learning Rust requires...

> Leave your hubris at home

> Declare defeat

> Resistance is futile. The longer you refuse to learn, the longer you will suffer

> Forget what you think you knew...

Now it finally clicked to me that Orwell's telescreen OS was written in Rust

replies(1): >>43983002 #
atoav ◴[] No.43983002[source]
But it is true. My own biggest mistake when learning Rust was that I tried to torce Object Oriented paradigms on it. That went.. poorly. As soon as I went "fuck it, I just do it like you want" things went smoothly.
replies(2): >>43984144 #>>43987271 #
rikafurude21 ◴[] No.43984144[source]
Sounds like an abusive relationship if im being honest. Your programming language shouldnt constrict you in those ways.
replies(5): >>43984486 #>>43984523 #>>43984615 #>>43984649 #>>43993404 #
hbn ◴[] No.43984615[source]
Every programming language has constrictions by the nature of having syntax.

In JavaScript you can declare a variable, set it to 5 (number), and then set it to the "hello" (string), but that's not allowed in e.g. C. Is C constricting me too much because I have to do it in C's way?

replies(1): >>43986014 #
dgfitz ◴[] No.43986014{3}[source]
I believe you can do that in C pretty easily with a void pointer, someone correct me if I'm mistaken.

Should you? Different question entirely.

replies(2): >>43988260 #>>44003293 #
1. quietbritishjim ◴[] No.43988260{4}[source]
But you can't add 2 void pointers and seamlessly get integer addition if they point at integers or concatenation if they point at strings.

(You could build your own custom data types that have type metadata in a shared header and an addition function that uses it, but then you're building your own custom language on top which isn't really the same thing.)

So yes C really does restrict you in some ways that Javascript doesn't.

replies(1): >>43988476 #
2. dgfitz ◴[] No.43988476[source]
That wasn't the constraint I was responding to, you moved the goalposts! :)