you are viewing a single comment's thread
view the rest of the comments
[–] 3 points 2 years ago (1 child)

You're confusing using tabs for indentation and spaces for alignment with using tabs and spaces for indentation. This means each line starts with tabs. Next you optionally have spaces for alignment with previous lines. Then you have content (like code or comments). Because you never have a tab following a space the alignment is never destroyed by adjusting how wide a tabstop is.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 0 points 2 years ago (1 child)

    I am not, it's easy to find examples where tabs first then spaces breaks down.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 2 years ago (1 child)

    That example is using tabs for both indentation and alignment. The article you linked even says not using tabs for alignment is a solution.

    • Do not use tabs for alignment. In such case given example should look like:
    fun foo x =
    --->let val abs = if x > 0
    --->              then x
    --->              else -x
    --->in
    --->--->(* ... *)
    --->end
    
  • source
  • parent
  • hideshow 2 child comments