13 ms·
> Because HTML forces us to repeat the name of the tag in the close tag, it encourages us to write things like: the <b>goto <u>label</b></u> statement What
by trumpete 11y ago
> Because HTML forces us to repeat the name of the tag in the close tag, it
encourages us to write things like:
the <b>goto <u>label</b></u> statement
What sort of demonic possession bullshit going on here? Who is "encouraged" to do such thing?
- blowski 11y agoI guess the OP means something more like "HTML makes it easy to make mistakes like ..." which is true. I believe English is not his native language.
- scott_s 11y agoI think that is what the author means, but I also think it's a valid usage; it's ironic.
- bencoder 11y agoYou 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.