curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Question about the C language version

From: Daniel Stenberg via curl-users <curl-users_at_lists.haxx.se>
Date: Mon, 13 Sep 2021 17:08:21 +0200 (CEST)

On Mon, 13 Sep 2021, David Hu via curl-users wrote:

> Why does `curl` still use the ancient C89 style code instead of C99, C11 or
> C17? It *is* 2021 right now! And C89 code restricts developers from using
> most modern C syntaxes and features. Could you please give an explanation
> why? Thank you!

As with everything in curl, there's a history and we keep using what we've
used before until someone brings up the subject and argues for and works on
changing it.

We started out using C89 in the 1990s because that was the only way to write
a truly portable C program and have it run as widely as possible. C89 was for
a long time even necessary to make things work on otherwise considered modern
platforms such as Windows. Today, we don't really know how many users that
still require the use of a C89 compiler.

We will remain using C89 for as long as nobody brings up a strong enough
reason for us to change our minds. The core developers of the project don't
feel restricted by this and we are not convinced that going C99 will offer us
enough of a benefit to warrant the risk of cutting off a share of users.

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2021-09-13