4 ms·
I don't see how having closing braces makes it easier to see what's grouped, though. If you have a page with enough elements and nesting going on that indentat
by parenthephobia 10y ago
I don't see how having closing braces makes it easier to see what's grouped, though.
If you have a page with enough elements and nesting going on that indentation doesn't make its structure clear, I find it hard to believe that you'll see </div></div></div> and think "oh yes, I just closed <div class='wombat'>".
A good editor may highlight the region that a </div> covers, and/or show the opening element and/or the "path" to the current element in the status bar.
But, a good editor that understands indented syntax could do the same. It is a fault in code editors that they don't often have good features for navigating around source which uses indenting. This isn't a problem with the syntax.
FWIW, I use SLIM - which is a Jadelike language for Ruby - and I hate having to deal with raw HTML. I find it incredibly hard to navigate, primarily because of the lack of indentation. All too often you think a particular block is contained in some element but it turns out it just looks that way because somebody decided to use indentation whitespace decoratively.