6 ms·
You are, presumably, already a developer, so you already understand nesting. Perhaps a better example that a beginner could find quite reasonable after learning
by bencoder 11y ago
You are, presumably, already a developer, so you already understand nesting.
Perhaps a better example that a beginner could find quite reasonable after learning about start and end tags:
<u>Underlined. <b>Bold and underlined.</u> Bold only.</b>
Why shouldn't that work?
- smashface 11y agoThis is a much better example of the point the author was trying to illustrate. Though I'm not sure sure if the HTML / TeX comparison is the best to exemplify the concept. I feel that if a beginner were to make the conceptual mistake that HTML tags are not nested that they may also not grasp that {}'s are to be nested as well. Thus falling into the same trap as HTML. I'll admit that {}'s look more obvious to form a nested structure but it may also be that my eyes are trained to see them exactly as such.
- arnsholt 11y agoThat's not allowed because parsing that kind of nesting requires a context sensitive parser, which is much more expensive computationally than context free parsers.
- tricolon 11y agoI understand that, you understand that, and your parent commenter probably understands that, but the point is that a user of HTML should not have to understand it.
- Arnavion 11y agoIRC formatting codes (not standard, but popularized by mIRC and thus implemented by most clients) are also toggles instead of begin-end pairs, so they allow this. If I remember correctly, old text processors like WordStar also implemented formatting as toggles.
- ygra 11y agoFun thing is: HTML goes out of its way to ensure that this does work.