Glas :Re: [glas] when to evaluate scalar expressions |
From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2006-04-25 07:19:20
Andreas Pokorny wrote:
>> Partial dispatching, i.e. dispatching only a specific part of an
>> expression to one backend and the rest of the expression to another
>> backend, is not directly supported. We thought long and hard about this
>> but partial dispatching leads to a lot of ambiguous situations.
>>
> I was asking because, the user would want to control the backend used in
> the pre evaluation of the scalar.
>
good point. This is indeed a drawback of evaluating scalar-expressions
early. So it's probably best not to evaluate scalar-expressions early
and thus dispatch the scalar-expression along with the complete
expression (that contains the scalar-expression).
If users desire to use the _result_ of the scalar-expression in another
expression they can first evaluate the scalar-expression by assigning it
to a scalar and use that scalar in any expression later on.
toon