Structs and Variadic Functions

Kenny seriousmoose at yahoo.com
Tue Dec 19 07:32:09 PST 2006


I would also like to see this. One of my favourite things about js, is that I can
send it an assoc array of whatever I want... functions, floats, strings, integers,
and the ones I don't send are null. having that for functions would be AMAZING...
I think it's not that hard to implement either. I suppose one could push on the
stack a list of pointers in the order they appear in the struct... the null ones
being uninitialized. then, inside of the function, the values will have to be
loaded, grabbing the value of a pointer. Technically, you can already do something
similar though, by setting default values for all params to the function.

1. but, you can't call them unordered, referencing only the names.
2. if you know you want the first and third argument initialized, then it's weird
to skip the second.

hmmmmm. this is a really good idea.



More information about the Digitalmars-d mailing list