Compile Time Execution of Inout Parameters

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Sun Mar 4 11:15:37 PST 2007


Walter Bright wrote:
> Frits van Bommel wrote:
>> It seems functions returning void can't be executed at compile time, 
>> even if they have out/inout parameters...
> 
> This is by design:
> 
> 1) functions with no output make no sense evaluating at compile time

agreed.

> 2) it makes no sense to have a compile time function return its value 
> via an out or inout rather than the return value

This just seems to be a pretty arbitrary restriction. I'm not saying I'd 
use it for anything other than testing if it works, but I don't see any 
technical reason to forbid it either...



More information about the Digitalmars-d mailing list