[macstl-dev] Opinions wanted: tied expressions (multi-valued
expressions and manual loop fusion)
Glen Low
glen.low at pixelglow.com
Mon Nov 28 08:46:24 WST 2005
All:
On 28/11/2005, at 8:14 AM, Glen Low wrote:
> 6. How to incorporate multiple output syntax into the proposal.
> E.g. a deinterleave function that deinterleaves 1 stream into 4
> might logically produce a 4-tuple so that
>
> tie (a, b, c, d) = deinterleave (e);
>
> But then what should the syntax be for applying operations between
> the deinterleaved streams i.e. what would be the succinct
> expression of
>
> tie (a, b, c, d) = deinterelave (e);
> f = (a * b) + (c * d);
>
> I suppose if we allowed temp placeholders and tie flattening, then
>
> tie (a, b, c, d, f) = tie (deinterleave (e), (a * b) + (c *d));
>
> could be one such syntax.
Just as an alternative, we could use the Boost lambda-like syntax of:
f = ((_1 * _2) + (_3 * _4)) (deinterleave (e));
although I suspect it will be less flexible than using ties.
Cheers, Glen Low
---
pixelglow software | simply brilliant stuff
www.pixelglow.com
aim: pixglen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pixelglow.com/lists/archive/macstl-dev/attachments/20051128/79519ef2/attachment.html
More information about the macstl-dev
mailing list