Re: [Boost-docs] [Gaea] Named optional attributes

Subject: Re: [Boost-docs] [Gaea] Named optional attributes
From: Matias Capeletto (matias.capeletto_at_[hidden])
Date: 2011-11-05 21:58:41


On Fri, Nov 4, 2011 at 9:29 PM, Joel de Guzman
<joel_at_[hidden]> wrote:
> On 11/2/2011 7:29 AM, Matias Capeletto wrote:
>> One thing that bugs me about the current definition of if
>> is that doesn't work like other templates because you can call it with
>> two or three parameters. To be a real template it should be defined in
>> the specs as [decl [if cond . branchs]]. But maybe it is somewhat
>> nitpicking :)
>
> I'm not sure I follow. The declaration of if is:
>
>  [decl [if cond then else]]
>
> You need exactly 3 arguments. You can't have 2.

Oh... I thought you will be able to use it with only two arguments,
and if the condition fails it will return [].

>> [var footnotes-list []]
>> [set footnotes-list [append [footnotes-list] [...]]
>
> TBH, I'm not quite happy with it either. The language is purely
> functional apart from that. There should be a way to do above using
> a purely FP way, but it's not as easy.

At least it follows scheme's (define x y) (set! x z).

> As always, suggestions welcome.

I was asking about other uses cases, because if it is only introduced
to deal with footnotes in HTML maybe they shouldn't need to be
introduced right now if it is only used to produce LaTeX or Docbook.
That way you can get some time to see how the real implementation
works.

If they are introduced, I am tempted to add a [push mutable-var
element] construct so the collectors are easier to write.

Cheers
Matias


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