Operator overloading -- lets collect some use cases

Bill Baxter wbaxter at gmail.com
Tue Dec 30 13:02:10 PST 2008

On Tue, Dec 30, 2008 at 11:30 PM, Frits van Bommel
<fvbommel at remwovexcapss.nl> wrote:
> Bill Baxter wrote:
>> Merging might be useful there too --- A ~= b ~ c ~ d  is probably more
>> efficiently implemented as 3 ~= ops.
> Actually, it's probably most efficiently implemented as 1 "~=" with multiple
> parameters. (DMD already does this for arrays)

True.  You mean look at all the inputs, figure out how much space
you're going to need in the end, and just do one allocation for all of

That's a good point.  So these kind of ops that increase the size of
the output really do need a different kind of fusion strategy.


More information about the Digitalmars-d mailing list