|
Boost : |
From: John Max Skaller (skaller_at_[hidden])
Date: 2001-06-29 23:26:21
Peter Dimov wrote:
> > This gets rid of the compile time overhead completely,
> > allows a reasonable limit on the size of tuples,
> > allows important optimisations, and may be mandatory
> > for generalising certain other library components
> > efficiently.
>
> This would probably be a step in the right direction, but the more important
> issue is how do you get from the function call expression
>
> f(x, y, z, 5)
>
> a tuple containing the arguments.
>
> Writing 10,000 operator()'s doesn't feel right. :-)
Step 1: you ban operator, [comma], either
a) completely (prefered)
b) inside brackets
Step 2: you define , as tuple constructor:
x,y,z -- a triple
OR
(x,y,z) -- if you only banned , inside brackets
Now:
f (x,y,z)
is precisely
f (t)
where t == (x,y,z)
See Felix. This is exactly what I do. It is also exactly
what SML does.
Note: there is no tuple with one element!
-- John (Max) Skaller, mailto:skaller_at_[hidden] 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 New generation programming language Felix http://felix.sourceforge.net Literate Programming tool Interscript http://Interscript.sourceforge.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk