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

I've been using the same already without knowing about this, but with a few exceptions. Most notably, I indent with tabs, because I can use a heredoc with tabs, i.e.

    hello() {
        cat <<-MSG
            Hello, world!
        MSG
    }
Here, I have tabs before "Hello, world!" and those are ignored by Bash. I also have tabs before MSG, i.e. I don't need to start the line with it, which would be pretty ugly. I understand the rationale about not using tabs, but I think tabs are needed for more readable code.



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

Search: