Peter N Lewis wrote:
I don't suppose there is any change Discard could take more than one parameter and discard them all?
I would not be difficult to add. OTOH, it would make it a more special extensions. As has been noted repeatedly, the lest "costly" extensions are those that behave like a predefined routine (though, here, accepting any type).
Well, my current solution is a whole bunch of Macros labeld Discard2, Discard3, ... Discard6, that take N parameters and expand to N calls to Discard. Not ideal, but it will work.
Discard ( a,b,c ) seems nice and clean to me, but I don't know the structure of GPC well enough to understand what complications it might add.
As I said, it wouldn't add considerable complications, that's not the problem.
My doubt is WRT what kind of extension we'd introduce and if it's warranted. This doesn't affect GPC directly, but it might affect other compilers trying to be compatible, and possibly even future versions of GPC. Due to some recent observations how unintentional misfeatures creep into usage and are hard to correct later (`absolute' extensions and other things), I've become more cautious about this aspect.
The existing `Discard' can (almost) be emulated with a procedure taking an untyped parameter (which is also not standard, sure, but supported by more compilers). A `Discard' with any number of arguments would require a "varags" procedure or at least "varargs macros" or something like that to emulate ...
This doesn't mean it's impossible to add it, if the advantages outweigh, but I'm not yet sure of that ...
FWIW, I myself use sequences of `Discard' when necessary. So far haven't felt particularly bad about it ...
Frank