Returning tuples from functions

Jari-Matti Mäkelä jmjmak at utu.fi.invalid
Tue May 1 16:15:18 PDT 2007


BCS wrote:

> Reply to Jari-Matti Mäkelä,
> 
>> BCS wrote:
>> 
>>> niovol wrote:
>>> 
>>>> When will it be possible? I have almost no experience in programming
>>>> on D. But I can't imagine how to solve my problem without using
>>>> tuples.
>>>> 
>>> Here's a nasty hack I came up with a while ago
>>> 
>> <snipped the nasty hack>
>> 
>> The only problem is that the struct version is 27 opcodes or 150%
>> longer that the inout/ref version at least on DMD/Linux. These hacks
>> aren't very useful until the optimizer gets better or something else
>> great happens.
>> 
> 
> That's all? I would have expected about a 10x increase in code size.

Hehe, you're right. Somehow I only calculated the generated code in the main
routine. Time to get some sleep :)



More information about the Digitalmars-d mailing list