

Python That Doesn't Suck: Whitespace-Inactive Python - jackowayed
http://github.com/jackowayed/ptds/tree/master

======
yungchin
Great. So now you can write code that you can only get the rest of the world
to use, if it's so absolutely magnificent that they'll replace their default
interpreter for it?

They might have also made it auto-insert the "self" method parameters, while
they were at it (I'm ignorant enough that I don't understand the usefulness of
those...)

~~~
mahmud
No reason it can't be preprocessed. It should be a straight 1:1 translation
between indentation depth to an opening/closing brace (a simple push-down
automaton.)

[Edit: he chose to go with begin/end; let's call this a Ruby That Doesnt'
Suck]

------
paulgb
Is this a joke? I don't mean to be insulting if it's not, but "Python That
Doesn't Suck" seems intentionally inflammatory. And as a Python coder, the
idea of the parser disregarding the indentation seems silly.

~~~
jackowayed
Well, I went with that name 1) because I couldn't think of anything better,
and 2) because if you don't think python's whitespace-activeness sucks, you're
not going to use it anyway.

Truthfully, I think I could get used to it (I'm a rubyist myself). But I've
talked to a number of people who have said basically, "I've heard it's a cool
language, but I hate/will not use whitespace-activeness.

~~~
jdp
Why is it that people hate active whitespace? I think it's great that the
parser can detect where blocks end just by maintaining a nice code structure.
I guess people are just against it on principle? Just in edge cases where
indenting wouldn't make sense?

~~~
jackowayed
One question, does python have an equivalent to irb
(<http://en.wikipedia.org/wiki/Interactive_Ruby_Shell>)? If so, how do you get
into/out of blocks?

~~~
paulgb
Yup. If you start the python interpreter, it opens up into an interactive
shell. You still have to indent inside the block, and python interprets the
code after you enter a blank line.

ipython is an improved python shell, with tab-completion and some other cool
features.

