[Issue 9980] [CTFE] Allow interpreting function with variable arguments when their values aren't used

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 14 02:29:49 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9980


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


--- Comment #5 from Don <clugdbug at yahoo.com.au> 2013-08-14 02:29:43 PDT ---
(In reply to comment #4)
> (In reply to comment #3)
> > ...
> > 
> > So what this request is, is quite difficult to describe. It's kind of "delay
> > evaluation of function arguments in CTFE until the point at which they are used
> > in the function, if the argument has no side-effects".
> 
> It should be sufficient to delay error reporting. (But I see no use case.)

Yeah. But it's more complicated than the example suggests, since the 'unused
variable' may be passed to another CTFE function...
And this is actually extremely common. Very many functions only use their
arguments by passing them to functions.

I doubt you'd actually want this, since it would be hard to track down where
the unused variable actually came from. A backtrace is not an answer, you only
want the error messages to be exactly the same as they are now.

It's also not clear in this proposal what constitutes "using" a value.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list