Re: [Boost-docs] [Quickbook] Templates and Namespaces

Subject: Re: [Boost-docs] [Quickbook] Templates and Namespaces
From: Eric Niebler (eric_at_[hidden])
Date: 2007-08-02 01:15:00

Joel de Guzman wrote:
> Matias Capeletto wrote:
>> On 8/1/07, David Abrahams <dave_at_[hidden]> wrote:
>>> on Wed Aug 01 2007, "Matias Capeletto" <> wrote:
>>>> [namespace math]
>>>> [template formula ....]
>>>> [endnamespace]
>>> I hate this kind of XML-ish syntax formulation. We have brackets that
>>> can be matched; let's use them.
>> I agree with you. Why it was decide to use [endsect]?
>> I was only proposing something that looks similar to the actual
>> syntax, but I dislike the name endnamespace a lot.
> This was Eric's design decision. I'm CC'ing him.

Sure, blame me. ;-) This was a long time ago. I don't really remember
what I was thinking, but it was probably something like, "eh, this is
good enough." IIRC, it made the implementation simple. When you see
"[endsect]" spit out "</section>" or some such.

That's not a good reason anymore. Feel free to change it. And then fix
all my .qbk files for me. ;-)

> I too don't quite
> like XML-ish syntax formulation, but for long stretches of text,
> it certainly helps. If we strictly abide with the end-bracket,
> we'll end up with something like:
> [section stuff
> lotsa text here....
> [section sub-stuff
> and lotsa more text here....
> ] [/ sub-stuff]
> ] [/ stuff]
> which kinda reflects what we do in C++. For verrryy long stretches of
> text, we'd hope the author writes the trailing comment. Otherwise,
> we'll have to scroll back and forth figuring out the nesting.

Is that a problem?


> Now, my proposed syntax is:
> [section stuff]
> lotsa text here....
> [section sub-stuff]
> and lotsa more text here....
> [endsect sub-stuff]
> [endsect stuff]
> which makes it explicit and clear which starts and which ends. This
> also allows the parser to catch improper nesting. This also makes
> it more xml-ish!

I dunno. I kinda prefer the block syntax. Works nice if your editor can
do brace matching, which would make it easy to select a whole section
and move it elsewhere.

Eric Niebler
Boost Consulting
The Astoria Seminar ==>

This archive was generated by hypermail 2.1.7 : 2017-11-11 08:50:40 UTC