variadic functions
0ffh
frank at youknow.what.todo.interNETz
Sat Jan 5 00:59:40 PST 2008
Jarrett Billingsley wrote:
> "0ffh" <frank at youknow.what.todo.interNETz> wrote in message
> news:flmmgh$24hb$1 at digitalmars.com...
>
>> [...]
>> Anyways, I don't think this is really a big issue. It's just a bit of a
>> surprise for those of us who are used to a simpler paradigm.
>
> What would make most sense to me would be if there were a built-in variant
> type, or maybe a library-provided (library-extended?) variant type. Then
> variadic functions just become a flavor of typesafe varidic functions with
> some implicit casting to Variant. Then you can mess around with the array
> of args, change the values, change the size of the array, save it somewhere,
> pass it along, pass a slice along etc.
Right, there's that one solution, the array of variants where all the rest
goes. But I can do that now already, just with a different syntax than the
ellipsis. And just thinking of the runtime cost makes me dizzy, but that's
a personal thing. Probably comes from doing too much coding on 24MHz 16bit
machines. =)
regards, frank
More information about the Digitalmars-d-learn
mailing list