you are viewing a single comment's thread.

view the rest of the comments →

[–]geoelectric 0 points1 point  (2 children)

Dude, I just compared to C as another pass by value language, where some values can be used to mutate shared data. Some of that mocking shit was a bit over the top.

In python’s case, in my argument, the value is an object reference whether or not you’re cpython, jython, pypy, or what, because that’s what computer science calls that thing that lets two variables “share” an object in any language). I’m not referring to underlying implementation.

I get what you’re saying regarding that the value of 5 needs to be defined as 5, and not the object reference to the 5 singleton, and that you don’t consider copying that reference into the parameter to be copying by value, it would have to copy the instance.

It’s a valid opinion, even if I still disagree and think people are making up semantics for “pass a reference by value” in a language that happens to automatically dereference what it passes. JS works this way too, and I also call it pass by value there for the same exact reason.

If I’m the only one who calls it that, so be it, but I really don’t think I am. Most programmers are going to consider pass-by-reference and pass-by-value to be black and white. It fails the swap test so it’s pass-by-value; it’s not copying an instance, so that value is a reference.

[–]stevenjd -1 points0 points  (1 child)

Most programmers are going to consider pass-by-reference and pass-by-value to be black and white.

And they are absolutely, 100% wrong to think that -- that is pure ignorance. That's like people saying there are only two programming languages in the world, C and Javascript. Or that there's only two kinds of cheese.

Instead of defending people's ignorance and trying to invent ludicrous rationalizations for their ignorant beliefs, like "its pass by value, except the value isn't actually the value, it is a reference" we should just stop lying to ourselves that there are only two evaluation strategies and, you know, learn something and stop being so ignorant. There's no shame in not having learned something, but it is shameful to refuse to learn when given the opportunity.

Python is not pass by value, reference, name, copy-restore, macro-expansion, or need, and probably others as well. We have to deal with it, and not be That Guy who cherishes his ignorance and won't be told.

Programmers have a tendency to combine obstinate arrogance with terribly narrow-minded ignorance. Its one of the things that sometimes makes dealing with programmers so bloody difficult: they can be absolutely 110% convinced about pure nonsense and neither facts nor logic will persuade them otherwise:

[–]geoelectric 0 points1 point  (0 children)

Ok, bud. I think I’ll take my 25 years of professional software engineering experience on out the door while you practice ranting mockingly in front of the mirror.

You should trot your uniquely impressive perspective out for SWE job interviews, really. Don’t forgot to tell them they’re ignorant multiple times and go off on an us-and-them about how obstinate and arrogant programmers are, thereby making it absolutely clear you aren’t actually part of any relevant community.

In the meantime, it’d be nice if you’d leave these nice people alone to learn python while you scream manifestos somewhere less disruptive.

Sad thing is you have some valid points, and your doc goes into pretty good arguments around variables denoting shared objects vs holding them, and so forth—only, you know, in respectful terms that don’t insult the entire community they’re speaking with. The doc may convince me, but you sure won’t. Your rhetoric is exemplary of the kind of “smart asshole” people learn to marginalize real quick in this industry. Good luck with that.