cURL / Mailing Lists / curl-library / Single Mail


Re: "The Most Dangerous Code in the World"

From: Oscar Koeroo <>
Date: Mon, 29 Oct 2012 22:27:19 +0100

On 29-10-12 07:12, Lijo Antony wrote:
> IMHO, using enum values make APIs much cleaner, avoiding any possible
> confusion in using integer values like 0,1,2, etc. I already do this in my
> code for all CURL options. But having these enums provided by CURL itself,
> makes any future changes in values, as in this case, transparent to user
> code and APIs more intuitive to users, especially new users.
> -lijo

enums in C exposed to an external program will make the problem worse. enums
are after all numbers, no exceptions. Bindings from Python, Perl, PHP and
others will have a hard time pushing the right value. It's better to make
them explicit.

my 2cts,

List admin:
Received on 2012-10-29