Hacker News new | ask | show | jobs
by zalew 4862 days ago
> CoffeeScript has significant whitespace. So instant no. It makes it a pain in the butt to parse. It's annoying. Most people (except for Python developers) don't like it. Due to being difficult to parse, you will have problems when you try to refactor. Not to mention the problems of re-indenting everything when you have really long and ugly blocks you want to clean up (happens).

maybe people should stop writing unindented ugly blocks in their non-indent-significant language then?

1 comments

No one is writing un-indented code. The issue is lack of metadata for automatic indentation.

In C if I shift a block of code a quick gg=G will reformat and reindent. Possible because blocks are explicit and whitespace is separate from scope. By the same token autogeneration of {}'s is impossible in C. This is obvious but obfuscated in Python from whitespaces' overloading.

The issue is autogeneration of blocks. In any language blocks are a fundamental aspect of programming. Blocks affect the function of a program. Since we lack self-programming computers we also lack autogeneration of blocks. Python's issue is that a non-fundamental aspect of programming has been paired with a fundamental aspect of programming.

>Python's issue is that a non-fundamental aspect of programming has been paired with a fundamental aspect of programming.

Python's "issue" is that it considers readability as a fundamental aspect of programming and that whitespace is critical to that end. Whether that suits a particular programmer is a matter of personal preference.

No one is writing un-indented code.

Oh I beg to differ. I've seen lots of terrible unindented or patchily-indented code. Especially in Wordpress plugins.