this post was submitted on 16 Mar 2025
790 points (98.2% liked)
Programmer Humor
21706 readers
391 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I mean, this is correct in many cases, unironically.
It should be one of the core purposes of a programming language to help humans to write the code they intend. If a language doesnt do that then it's bad.
I tend to disagree. The language should allow me to do things, and what is simple and obvious logically should be simple and obvious in the language (I am looking at you, JavaScript with [] != [])
What I intend - well, more than half my work is figuring out what I intend, language should have no say in this, save things like "we do this kind of trick like this here" (for example, C++ has no concept of "interface" entity. Ok, looks like I can use virtual class instead)
It is when languages start trying to be "helpful" they become an ugly mess: meaningful white spaces in Python? The whole shit with prototypes and objects in JS(see above)? Fuck this shit, I am not going to call those two good programming languages
I think you're saying the same thing as what I am. If it's more complex than what you may think, the language should guard against it. If not, it should make it simple.
Rust, for example, is the only mainstream language where it isn't possible to read from a file handle after it's been closed. Doing so is a compilation failure. This is just a general invariant of "how to use files".
But you also don't need to think about allocating or deallocating memory in Rust. It does that fke you automatically, even though it's not GC.
JS can also be complicated when it tries to hide realities about the world. E.g. is a const array or object immutable? No, the pointer is. But pointers don't exist! /s
Looks like we still differ. If something is more complicated than what I may think, then there are some possibilities:
And if I managed to try reading from a closed handle, or to access a memory that I am not actually allowed to use, or... (could not get more examples out of the top of my head), it is not the job of the language to slap my hands, as long as I follow the syntax. Most of the time (if not all the time) this means I have not accounted for something that my code allowed to happen - so my responsibility to deal with that
What I keep hearing about Rust is still in the lines of too-much-fucking-care (that's besides obviously dumb rule of "no more than one owner of a variable at any moment" which then had to be worked around because not everything can be done this way. please correct me if I am wrong here)
Yep, we disagree. The world and technology especially is an extremely complicated place. IMO any complex system that is built upon "humans should just know all this complexity and keep it in mind all the time" is fundamentally broken.
It depends. We may have our differences in weighing things, but yes, complexity of the system must correlate with complexity of the task it is used for. A system allowing to do things without any complexity means either no complex things to be done or straight up magic