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-01 09:50:24

On Tue, Nov 1, 2011 at 6:15 AM, Joel de Guzman
<joel_at_[hidden]> wrote:
> On 10/31/2011 8:16 PM, Joel de Guzman wrote:
>> I think this makes perfect sense. I'll see how I can incorporate
>> these.
> I've added optional arguments and tightened up the spec a bit
> especially on arguments, markups and lists and template
> identifiers. I also added scoping. Here's the latest
> (still informal) spec:

One thing that I forget to add in my last mail was the possibility to
give a default value to the optional arguments. If not included, the
default value is nil '[]' so we can check for that to see if it was
The specs could easily be extended:

  [def [$ path ~width ~height] ... ]


  [def [$ path [~width 100px] [~height 100px]] ... ]

I know it is only syntax sugar because you could get the same effect
checking for nil in the body but I think this will be a common
scenario that is good we support right away.

> I modified the optional argument proposal a bit using tilde '~'
> instead of dot '.' for named optional args. I want to use the
> '.' for scoping.

It looks good.

> The later part of the spec discusses namespaces and scopes.

Can you explain this a little bit more?

  You may import names from other scopes this way:

    [import [ns][foo][bar]] [/ Import foo and bar from ns ]"

Is import defined like [def [import ns . symbols] ... ] ?
Visually, I do not like that the three symbols are in the same level.
Maybe is just aesthetics but I think I prefer something like



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