Hacker News new | ask | show | jobs
by lylecubed 2825 days ago
> why do folks completely avoid a language for a single relatively bland syntactic feature?

Personal preference isn't a good enough reason?

I don't like white space sensitive languages because I've seen what happens in python when somebody accidentally adds a couple of lines formatted with spaces into a file formatted with tabs. I've seen git and svn mangle tabs. Long blocks are harder to track. Refactoring functions and nested ifs are much harder to keep track of. If you somehow lose all of the formatting in a block or a file, it's much more difficult to recreate the code if the only block delimiters are whitespace.

Essentially, white space delimiters are just one more thing that can go wrong and ruin my day. I try to keep those to a minimum. That said, Nim is my new go to for short scripts. I wouldn't write anything large in it for the reasons mentioned above.

2 comments

Nim disallows tabs entirely, and in Python 3 it's an error to mix the two in the same file. So those errors can't happen anymore.

Out of your list, the only one that seems like a real problem is recreating blocks if the code lost all formatting.

You just described two errors that do actually happen and in the next sentence say those errors can't happen anymore. What am I missing here?
The comment I replied to was talking about errors arising from mixing tabs and spaces and incorrect indentation levels that arise from it.

If a language either disallows tabs entirely or will refuse to run/compile code that mixes tabs and spaces in the same source file, you obviously can't get errors related to mixing tabs and spaces.

loosing parts of your code is bad. The same goes for braces, if you loose them in a big c program your day is ruined as well.