Hacker News new | past | comments | ask | show | jobs | submit login

I've used Python in the past and never once had problems with the 'whitespace thing'. However, I think it is limiting for things like templates where you want to sort of abuse the language and mix it up with text. Also, it seems to put lots of people off, and even if they're being a bit silly, it may be a consideration in terms of your goals of having the language adopted.



I developed a relatively large web app with Python. Python's meaningful whitespace is the primary reason I no longer use python.

When one is working on a server, the editing tools are sometimes limited and they thus can make seeing the whitespace hard. In another, smaller, Python project, we had whitepace errors that appeared and disappeared like ghosts. Even if you have tools that make seeing everything easy now doesn't that you will have them later, on another system - especially, sooner or later spaces and tabs will get confused and be invisible.

I haven't programmed in C for years but the meaning of C programs is still obvious at a glance to me. After being away from python for a couple of years, the meaning of python program is opaque to due to the meaningful whitespace syntax. I know I could pick python up again if I tried but this indicates to me that python's syntax is not as natural as what Steve McConnell calls block structure. The end of a block is just as important to find as the start and so should be just as visible.

Writing one-line functions is, if anything, easier in Ruby than in Python.

Oh, and a syntax that requires as comments to show a normal program constructs is broken virtually by definition.

I can understand the appeal of the syntax. The syntax indeed appealed to me at one time and I enjoyed the rest of the language. But I think ultimately meaningful whitespace just does not work and will confined python to being a niche language.


When are your editing tools so limited you must use tabs mixed with spaces? That doesn't really make sense.

Just don't use tabs, ever. If you have whitespace problems you can simply grep for tab characters and remove them.


Keep in mind that part of 'scaling down' (making stuff accessible to new users) is that new users are the ones most likely to use lame or inappropriate editors. Stuff like Java and Lisp need more in terms of editors because of verbosity, and sorting through the parens, respectively.


I think you are making 2 good points here.

First, we went through transition from begin...end to {...} and it porbably wasn't as painful for conservative folks as it is now when going from {...} to indentaion. So one question for a language designer is to whether target conservative public or not.

Second, mixing two styles when, for example, generating markup makes Python a burden. They don't go well together. You have to focus on two things: what your code is doing and proper indentation at the same time, while with C-style languages you worry only about the code. Oh, and the "isolate code from markup" concept hasn't been proven to be effective in all situations. So another decision to be made is to whether the language is going to be used on the Web.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: