• JackbyDev@programming.dev
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    2
    ·
    edit-2
    10 months ago

    Using only tabs for indentation and only spaces for alignment will never result in crap alignment when adjusting tabstops because the alignment does not use tabs.

    This is using both tabs and spaces for alignment.

    --->func foo(int i,
    --->--->     int j);
    

    Observe what adjusting the tabs does,

    ->func foo(int i,
    ->->     int j);
    

    This uses only spaces for alignment,

    --->func foo(int i,
    --->         int j);
    

    When converted the alignment is maintained because the tabstops aren’t used for alignment, only for indentation.

    ->func foo(int i,
    ->         int j);