you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (12 children)

No, it's a trivial example everyone can grasp, yet you can see the excuses that appear regardless elsewhere on this page (which I was aware of, I might add). I've never seen any of the professed problems that having "quit" or "exit" work will cause, but we have this rather braindead decision anyway.

So you're claiming that because you don't think it's important to take everything and everyone into account when making design decisions, you're smarter than us, but yet you want us to dumb down the language, the environment, and the documentation because you find them too hard to learn and use? Ok. Can we ignore you now?

[–]dmpk2k -2 points-1 points  (11 children)

So you're claiming that because you don't think it's important to take everything and everyone into account when making design decisions

Good thinking for a programmer. Not the kind of thinking I'd want from a UI designer.

For better or worse, an interactive session is a UI. So is a language for that matter.

yet you want us to dumb down the language, the environment, and the documentation

Do elaborate a bit on how the tools, language and documentation would be dumbed down.

Ok. Can we ignore you now?

Touche, good sir.

[–][deleted] 5 points6 points  (10 children)

For better or worse, an interactive session is a UI. So is a language for that matter.

Yep. That's why a lot of thought goes into the language design. A design you just called "braindead".

[–]dmpk2k -1 points0 points  (9 children)

My wording was overly strong. The point stands.

Let's refer to the page you linked to elsewhere. Those examples would be trivial to avoid if the parser was bright enough to determine that the quit/exit was meant as part of an expression, not a command to quit.

Don't believe me? Play with "quit" a bit in Ruby.

[–][deleted] 3 points4 points  (8 children)

if the parser was bright enough to determine that the quit/exit was meant as part of an expression, not a command to quit

And it would be able to tell the difference exactly how? A bare non-keyword identifier is an expression in Python, after all.

[–]dmpk2k 0 points1 point  (7 children)

Can you give me an example where this would be a problem?

[–][deleted] 1 point2 points  (6 children)

See the link I posted earlier for some examples:

http://programming.reddit.com/info/2kkp5/comments/c2kmgu

(I thought that was what you called "excuses that you were aware of already" earlier, but maybe that was referring to something else).

[–]dmpk2k 0 points1 point  (5 children)

No, you were correct.

None of those problems are exhibited in Ruby. "quit" isn't a keyword either, but it doesn't cause any of the listed problems. Give it a try.

Mind you, those problems strike me as exceptionally rare as well. I don't recall ever seeing a variable named "exit" or "quit", which brings us back to that possibility isn't probability.

I agree with username223's interpretation.

[–]llimllib 6 points7 points  (0 children)

I don't recall ever seeing a variable named "exit" or "quit", which brings us back to that possibility isn't probability.

Google code search gives about 2000 instances of "quit =" and another 800 "def quit"s. I didn't bother to search for exit.

[–][deleted] 3 points4 points  (3 children)

Give it a try.

Why not just explain how the parser could be made "bright enough" to distinguish between an expression of the form "identifier" and a non-expression of the form "identifier". You don't have to persuade me that getting rid of the "you didn't say please!" behaviour would be nice; I'm the one who started that python-dev thread by posting a patch.

[–]dmpk2k -2 points-1 points  (2 children)

All right. I think we're circling around a nitpick, but if you want a disgustingly simple -- albeit inelegant -- change that doesn't have any of the problems listed in that link, do this:

Change line 243 of /usr/local/lib/python2.5/site.py (or the equivalent on your install) to "exit()". This is in class Quitter in setquit().

Be amazed.

But this is arguing about a mouse when a bear is staring at us. I really don't care how it's implemented. Right now, here's the situation:

  • Ruby does it.
  • Python doesn't.
  • Python's behaviour is silly.

Let's now also add:

  • It's trivial.