curl-library
Re: [PATCH 0/5] Add some curl*va() API functions
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 23 Jan 2017 15:42:08 +0100 (CET)
Date: Mon, 23 Jan 2017 15:42:08 +0100 (CET)
On Mon, 23 Jan 2017, Ioan-Adrian Ratiu wrote:
> However I have one question: Why were these libcurl functions written using
> `...` args when they really take only one?
I'm afraid the *why* doesn't matter much now. We (or I perhaps) made that
decision eons ago and we stick to that now for compatibility. In hindsight, I
think we should've designed it differently.
The reasons why we went with that decision are basically:
1. We didn't originally intend to just have one argument for each
2. We wanted to pass in different types, and ... is still usable for single
arguments of different types in ways we'd otherwise have to use some funny
union or typecast tricks to achive.
-- / daniel.haxx.se ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2017-01-23