Make Python look like Ruby
Show HN: Python with do..end in place of strict indentation
21–30 of 71 posts
Re: Show HN: Python with do..end in place of strict indentation
#22Anyone who can't see past Python's indentation-based syntax is a person who doesn't understand Python. (Both literally and figuratively!) When "significant whitespace" is at the top of someone's complaints about Python, I'm immediately done hearing about their superficial criticism of the language.
Re: Show HN: Python with do..end in place of strict indentation
#23Good job trying something new out! There is always room for experimentation, if any reason to try to learn something new.
Re: Show HN: Python with do..end in place of strict indentation
#24Make Python look like Ruby
Re: Show HN: Python with do..end in place of strict indentation
#25> I built this to learn more about python/interpreter language syntax in general, but not interested in pursuing this further. Good job trying something new out! There is always room for experimentation, if any reason to try to learn something new.
Re: Show HN: Python with do..end in place of strict indentation
#26Anyone who can't see past Python's indentation-based syntax is a person who doesn't understand Python. (Both literally and figuratively!) When "significant whitespace" is at the top of someone's complaints about Python, I'm immediately done hearing about their superficial criticism of the language.
Literate programming tools that weave/tangle code and documentation don't play well with significant whitespace. Not a problem for me, but I think it's on a valid line of complaints.
Triple quoted docstrings just require that the initial marker (""" or ''') is indented properly (since they are not considered blank lines). All contained text, and the closing marker, can be at any indentation level. This is the cleanest way to include a page of free form documentation, mid anywhere.
Re: Show HN: Python with do..end in place of strict indentation
#27 def function(x) do
end
without writing "pass"?Re: Show HN: Python with do..end in place of strict indentation
#28Earlier quoted context omitted.
When I hear someone complain about the whitespace thing, it sends a message to me that they do not format their code well and just go willy-nilly on their indentation. If you're properly indenting code, then it always works as intended . Proper indentation doesn't come from a desire to make the code work, it comes from a desire to make it readable. It just happens that readable means correct in Python's case. It lite…
I just translated all my build scripts written in Python to straight C due to indentation issues. Not because I don't format my code properly, but because any time I refactored my code, I ended up with dozens of subtle indentation related bugs that took hours to find and fix. If your language requires an IDE, then you have become Java.
Re: Show HN: Python with do..end in place of strict indentation
#29Anyone who can't see past Python's indentation-based syntax is a person who doesn't understand Python. (Both literally and figuratively!) When "significant whitespace" is at the top of someone's complaints about Python, I'm immediately done hearing about their superficial criticism of the language.
Literate programming tools that weave/tangle code and documentation don't play well with significant whitespace. Not a problem for me, but I think it's on a valid line of complaints.
Maybe you're thinking of mixing Python with HTML? Python based HTML templating can be ugly, and the significant indentation of Python is a very poor mix for replacing Javascript in whitespace-agnostic HTML.
Re: Show HN: Python with do..end in place of strict indentation
#30Anyone who can't see past Python's indentation-based syntax is a person who doesn't understand Python. (Both literally and figuratively!) When "significant whitespace" is at the top of someone's complaints about Python, I'm immediately done hearing about their superficial criticism of the language.
When I hear someone complain about the whitespace thing, it sends a message to me that they do not format their code well and just go willy-nilly on their indentation. If you're properly indenting code, then it always works as intended . Proper indentation doesn't come from a desire to make the code work, it comes from a desire to make it readable. It just happens that readable means correct in Python's case. It lite…
That's quite the assumption.