Boost logo

Boost :

From: joel de guzman (joel_at_[hidden])
Date: 2001-05-26 19:33:09


From: "Douglas Gregor" :

> > I agree. I think that reads much more clear to me. The [][] idea is
> > only useful if you REALLY want to use []'s.
>
> I also like the a.repeat(0, more) and repeat<0, more>(a) syntax, though my
> preference would be to remove some of the extra typing and go to:
>
> a<0, more>()
> a(0, more)
>
> Supporting both may help some optimizations but also allows variable
lengths.
>

Yet after sometime tinkering with the [][], it grows on you. One thing
I like about the [] is that it clearly separates iteration from grouping:

(a | b | c)[0][more]

vs.

(a | b | c)(0, more)

So, why is the [][] yucky?

***

(a | b | c).repeat(0, more)

is crystal clear though.

Joel de Guzman

PS> But it still doesn't beat: *(a | b | c)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk