News for hackers. Stuff that matters.
Re:The Little Manual of API Design (2008) [pdf] by bencoder on Thursday June 18, 2015 @09:57AM (#9738504)
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?
Re:The Little Manual of API Design (2008) [pdf] by smashface on Thursday June 18, 2015 @11:40AM (#9739273)
This 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.

Re:The Little Manual of API Design (2008) [pdf] by ygra on Friday June 19, 2015 @01:35AM (#9743159)
Fun thing is: HTML goes out of its way to ensure that this does work.
Re:The Little Manual of API Design (2008) [pdf] by arnsholt on Thursday June 18, 2015 @02:38PM (#9740709)
That's not allowed because parsing that kind of nesting requires a context sensitive parser, which is much more expensive computationally than context free parsers.
Re:The Little Manual of API Design (2008) [pdf] by tricolon on Thursday June 18, 2015 @03:07PM (#9740931)
I 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.
Re:The Little Manual of API Design (2008) [pdf] by Arnavion on Thursday June 18, 2015 @05:07PM (#9741623)
IRC 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.