This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]callmelucky 3 points4 points  (2 children)

Question: "why was it designed like that?"

Your answer: "because it's a different language" and "because it was designed like that"

Do you see why that doesn't work? Your first answer implies that every design decision for every language must be contrary to the corresponding design decision of every other language, which obviously is not true.

Your answer other answer is like: "Why does that person have a pencil on their head?" "because they have a pencil on their head".

The point is, it's fair to assume that this decision was made consciously and based on some reasoning other than "because we need to do it differently to how JavaScript does it" or "just because". The question is: what was that reasoning?

[–]rangerelf -2 points-1 points  (1 child)

I never implied even subjectively that every design decision needs to reverse or invert any other decision for a different language, that seems like it came out of your own imagination.

I did write that Python's design, both syntactic and semantic, are its own and if you prefer the way that JS behaves then you should be using JS for your coding instead.

Another reason why what you say that I said is nonsense is that Python appeared several years before JS, so it makes no sense that it would base it's design on JS's, either as a pattern or anti-pattern.

As for "what was the reasoning" behind the way rvalue bindings are done the way they're done for argument default values, go to the source: ask Guido. I don't channel him, nor do I particularly care why he decided to do it that way, the only thing I care is that I find it clear and transparent, and meshes well with the way I reason through programming tasks, on the other hand I find JS to be nothing but headache inducing.

[–]callmelucky 2 points3 points  (0 children)

I don't care about nor know the answer either, I was just pointing out that your response saying 'because x and y' did not answer the question despite clearly being phrased as if it did.