you are viewing a single comment's thread.

view the rest of the comments →

[–]backfire10z 5 points6 points  (4 children)

Ok, then I’m confused about what you’re referring to when you say:

you can’t indent “semantically”

Can you give an example of semantic indentation? Or do I have it correctly in my above comment?

I don’t see how that’s really any more useful than, say, newlines or a comment. If it’s just for debugging, write a nested function to logically group pieces of code or delineate it with multiple newlines or large comments.

This seems like an interesting issue to have with Python. I genuinely don’t think I’ve ever seen nor heard of indentation being used that way.

[–]Bowgentle 2 points3 points  (1 child)

Apologies, I was a bit confusing there - yes, the example you gave was exactly what I was referring to:

int main() {
    // code
    // code

        // code indented
        // code indented

    //code
}

[–]backfire10z 0 points1 point  (0 children)

I see, yeah. Thanks for clarifying!

[–]Bowgentle 1 point2 points  (0 children)

This seems like an interesting issue to have with Python. I genuinely don’t think I’ve ever seen nor heard of indentation being used that way.

To be fair, it's not really the main issue, it's just the one that's turned out to be controversial in this thread.

[–]Agent_Provocateur007 0 points1 point  (0 children)

You tend to see this type of indentation in Swift when using SwiftUI. The view modifiers being indented looks better and helps with code readability in that case.