Specify the type but not number of function arguments in an interface?

downs default_357-line at yahoo.de
Tue Jul 7 05:29:40 PDT 2009


downs wrote:
> Jarrett Billingsley wrote:
>> On Sun, Jul 5, 2009 at 5:44 AM, downs<default_357-line at yahoo.de> wrote:
>>> Doctor J wrote:
>>>> I want to write an interface that expresses the following idea: "classes implementing this interface must have a void function named update, with a fixed but indeterminate number of parameters of the same (template parameter) type."
>>> Use a typesafe variadic function, i.e.
>>>
>>> void test(int[] integers...);
>>>
>> Read the rest of his post, downs.  Particularly option 2.
> 
> Oops.

But then isn't what he asks for kinda impossible by design? I mean, interfaces are bound at runtime. That's what they _do_.


More information about the Digitalmars-d-learn mailing list