Boost logo

Boost :

From: Dave Gomboc (dave_at_[hidden])
Date: 2002-10-10 03:10:06


> > Usage:
> >
> > init(container)(value1)(value2)(value3);
> >
> > or
> >
> > init(map)(key1, value1)(key2, value2);
>
> nice stuff! It is considerably simpler than my initial code. I presume
> you like the lisp syntax better :-)? As you know, I don't think it is
> the right one. One could choose to support both, though. The problem of
> missing a value in the assignment to the map is hypothetical. If I wan't
> to map int to int, I can make the mapping just as clear by using newline
> or tabs:
>
> set_map( m ) += 1,2 2,3 3,4 5,6;
>
> set_map( m ) += 1,2
> 2,3
> 3,4;
>
> The first version is the best. One would never miss a value that way and the
> values are easier to read than something burried in paranthesis:
>
> init( m )(1,2)(2,3)(3,4);

Personally, I prefer the parentheses -- the tuples are immediately
visible. It's downright non-intuitive to use whitespace as a tuple
separator.

Dave


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