Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wouldn't say, I hate tabs. But I strongly prefer not using tabs in source code. Let me explain why. There are some languages and coding styles where it doesn't really matter. E.g. when you are always indenting by multiples of some indentation length. But there also languages and coding styles where you want to align stuff.

Consider this example:

    def someFunctionName(Int firstParameter, Boolean secondParameter, String thirdParameter)
Let's say, that line is too long. We could format it like this:

    def someFunctionName(Int firstParameter, Boolean secondParameter, 
        String thirdParameter)
    
Or we could format it like this:

    def someFunctionName(Int firstParameter, Boolean secondParameter, 
                         String thirdParameter)
Or event his

    def someFunctionName(Int firstParameter, 
                         Boolean secondParameter, 
                         String thirdParameter)
In the second two variant the indentation depends on the length of someFunctionName, so it is not necessarily a multiple of four or whatever your tab width is.

There are other similar situation when aligning in multiple columns, etc.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: