|
Boost : |
Subject: Re: [boost] [xint] Boost.XInt formal review (concrete complaint)
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2011-03-08 13:01:13
Chad Nelson wrote:
> On Mon, 7 Mar 2011 08:46:44 -0800
> "Simonson, Lucanus J" <lucanus.j.simonson_at_[hidden]> wrote:
>
>>> I'm not familiar with a use of expression templates that would allow
>>> that. Can you point me to something explaining it?
>>
>> The operator+, for example, returns an expression template object
>> that holds references to all the arguments of the orignal function
>> and type information that it was operator+. [...]
>
> Thanks. I think I see it now, and I'm playing with the concept to see
> whether it would be a good fit. Early comments from people who've used
> it suggest that it might not be.
Ok, who were those people and what did they say about expression templates?
I know there were some people that were concerned about compile time. If that is the concern then we have a classic trade off between compile time and run time. When we were having the "how I code" thread recently I listed my priorities in relative order. Compile time didn't even make the list and runtime was #2. Different people have different priorities, but I have never heard of someone who valued compile time over run time. If someone values compile time over conciseness, readability and equational reasoning afforded by operator syntax then they might opt to abandon operators entirely to get fast code that passes storage by reference for the result of every operation into a three argument function. Such people would probably be satisfied with the low level interface you already plan, and won't pay for the operator syntax they don't use.
Regards,
Luke
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk