Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #140583
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Simple 2d C99 fractal plotter... |
| Date | 2019-02-05 22:39 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <q3cvrd$kdk$1@dont-email.me> (permalink) |
| References | (10 earlier) <Dee6E.734899$kk4.604984@fx36.am4> <q3c3fg$lqn$1@dont-email.me> <dEh6E.148114$UF1.12452@fx13.am4> <q3cc2a$bfd$1@dont-email.me> <u9l6E.255512$gy2.104524@fx21.am4> |
On 05/02/2019 20:07, Bart wrote: > On 05/02/2019 16:02, David Brown wrote: >> On 05/02/2019 16:06, Bart wrote: > > >> I can appreciate compilers not having C11 support - it is not a commonly >> used standard. > > But if Chris used C11-only features that weren't supported by a > compiler, what you be as dismissive of it as you are with the likes of > MSVC? > Many C implementations are not yet fully C11 compatible - especially threading (this is usually a library issue, not a compiler issue). This is unfortunate. It is not too bad, however, in that C11 threads are not likely to be particularly popular - they give you less than using OS-specific threading libraries, or cross-platform threading libraries. (It's different for C++11, which has a number of useful features in its threading stuff.) > >> Again, look at the details. People have been writing C99 code with gcc >> for a very long time (though it did take a number of years before gcc's >> C99 support was practically complete). > > >>>> OK. Call it "outdated compiler", or "toy compiler" if you prefer. >>>> Don't call it a "C compiler", because that implies real, modern C. (It >>>> actually implies C17 support, since that is the current version of C.) >>> >>> So as soon as the first C17 compiler comes out, all other C compilers > > (I've just realised 2017 has come and gone! Are there any actual C17 > compilers?) > Since C17 is basically just a bug fix and a nicer typographical layout, yes. >> No, I did not say anything like that. >> >>> Nonsense. > > You said this: > > "So 6 of them are not C99 compatible, and are not serious general > purpose compiler implementations" > > Why C99? The current C standard is C11, which is now 8 years old. Yet > you seem to consider one that doesn't support 100% C11 as still a > serious contender, but one that doesn't support 100% C99 as not serious. > Or a toy. Basically, C99 came with a number of major and useful additions to the language - few people who use C99 regularly would ever want to go back to C90. It also has a large number of minor or obscure features, some of which are optional, which may be of relevance to a few people but are rarely needed (like support for systems with more restricted character sets, and hexidecimal floating point formats). I don't see it as a big problem if those are missing from a compiler that covers the major parts of C99. But an implementation that can't handle "long long" in a printf, type-generic maths, compound literals, designated initialisers, VLA's, mixed declarations and code, inline, _Bool, and // comments - that is just painful to use. C11 added relatively little to the language - support for multi-threaded code is the main point (whether or not you use its <thread.h> functions), with atomics, _Generic and _Static_assert being other useful points. C17 is, as has been said, a bug fix. I'd expect any compiler that has basic C11 in place, and is actively developed, to have C17 support before long. > > That it took so many years to get widespread C99 support suggests to me > that it wasn't easy to do. (I know you will argue every single C99 > feature is trivial to support.) And it took gcc apparently over a decade. > I assume that some of the C99 features were not trivial to implement. Development of compilers takes time, as does their distribution into mainstream use. There has been enough time for C99. > So it does seem to me that you are being unduly harsh on any > implementation that hasn't yet, or doesn't want to, support full C99. It > didn't stop gcc from being used seriously during the years it took to > achieve full compliance. I probably have been unduly harsh - it's a fair criticism. But I would not consider a C implementation to be a modern general-purpose tool suitable for developing new C code unless it had at least the majority of C99 support. It might be okay as a niche or special-purpose tool, and might be okay for building existing code. > > These are some significant C99 features that my bcc project doesn't > support (and won't do as I've lost interest): > > - VLAs including variable types as parameters > - Designated initialisers > - Compound literals > - Complex types (might have been pre-C99) > > Interestingly, many of those aren't supported by C++ either, so I'm not > going to lose any sleep over them. C++ has complex types - but they are implemented as a template library, rather than a fundamental type (that is the right choice for C++, and was not an option for C - but it is unfortunate that the result is incompatible). C++ does not have VLA's as such, but some kinds of array (those with a compile-time "const" size) are allowed as normal arrays in C++ while they count as VLA's in C. In C++, std::vector is usually used where you might have a VLA in C. Designated initialisers are an extremely useful feature, and can make code significantly more robust in the face of changes. (Imagine you have a struct type declared in a header, and you want to initialise an object of that type in your code. Designated initialisers make this safe even when the struct definition changes.) It is something that has long been called for in C++, and is part of the next C++20 standard. I find compound literals to be occasionally neat. I don't use them much.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Simple 2d C99 fractal plotter... "Chris M. Thomasson" <ahh_f_it@crap.nothing> - 2019-01-25 14:24 -0800
Re: Simple 2d C99 fractal plotter... "Chris M. Thomasson " <ahh_f_it@crap.nothing> - 2019-01-25 15:11 -0800
Re: Simple 2d C99 fractal plotter... Eli the Bearded <*@eli.users.panix.com> - 2019-01-25 23:50 +0000
Re: Simple 2d C99 fractal plotter... "Chris M. Thomasson" <ahh_f_it@crap.nothing> - 2019-01-25 16:33 -0800
Re: Simple 2d C99 fractal plotter... Bart <bc@freeuk.com> - 2019-01-26 00:45 +0000
Re: Simple 2d C99 fractal plotter... "Chris M. Thomasson " <ahh_f_it@crap.nothing> - 2019-01-25 16:55 -0800
Re: Simple 2d C99 fractal plotter... Bart <bc@freeuk.com> - 2019-01-26 00:59 +0000
Re: Simple 2d C99 fractal plotter... Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-01-26 20:29 +0000
Re: Simple 2d C99 fractal plotter... Bart <bc@freeuk.com> - 2019-01-26 21:37 +0000
Re: Simple 2d C99 fractal plotter... Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-01-27 12:11 +0000
Re: Simple 2d C99 fractal plotter... Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-01-27 13:40 +0000
Re: Simple 2d C99 fractal plotter... Bart <bc@freeuk.com> - 2019-01-26 00:57 +0000
Re: Simple 2d C99 fractal plotter... "Chris M. Thomasson" <ahh_f_it@crap.nothing> - 2019-01-27 15:37 -0800
Re: Simple 2d C99 fractal plotter... Bart <bc@freeuk.com> - 2019-01-26 12:35 +0000
Re: Simple 2d C99 fractal plotter... David Brown <david.brown@hesbynett.no> - 2019-01-27 13:20 +0100
Re: Simple 2d C99 fractal plotter... Bart <bc@freeuk.com> - 2019-01-27 14:13 +0000
Re: Simple 2d C99 fractal plotter... David Brown <david.brown@hesbynett.no> - 2019-01-27 16:36 +0100
Re: Simple 2d C99 fractal plotter... "Chris M. Thomasson" <ahh_f_it@crap.nothing> - 2019-01-27 14:28 -0800
Re: Simple 2d C99 fractal plotter... Bart <bc@freeuk.com> - 2019-01-27 23:53 +0000
Re: Simple 2d C99 fractal plotter... "Chris M. Thomasson" <invalid_chris_thomasson_invalid@invalid.com> - 2019-01-29 13:11 -0800
Re: Simple 2d C99 fractal plotter... Bart <bc@freeuk.com> - 2019-01-29 22:23 +0000
Re: Simple 2d C99 fractal plotter... "Chris M. Thomasson" <invalid_chris_thomasson_invalid@invalid.com> - 2019-02-04 15:30 -0800
Re: Simple 2d C99 fractal plotter... Bart <bc@freeuk.com> - 2019-02-05 01:26 +0000
Re: Simple 2d C99 fractal plotter... Ian Collins <ian-news@hotmail.com> - 2019-02-05 16:14 +1300
Re: Simple 2d C99 fractal plotter... David Brown <david.brown@hesbynett.no> - 2019-02-05 11:38 +0100
Re: Simple 2d C99 fractal plotter... Bart <bc@freeuk.com> - 2019-02-05 11:14 +0000
Re: Simple 2d C99 fractal plotter... David Brown <david.brown@hesbynett.no> - 2019-02-05 14:35 +0100
Re: Simple 2d C99 fractal plotter... Bart <bc@freeuk.com> - 2019-02-05 15:06 +0000
Re: Simple 2d C99 fractal plotter... David Brown <david.brown@hesbynett.no> - 2019-02-05 17:02 +0100
Re: Simple 2d C99 fractal plotter... Bart <bc@freeuk.com> - 2019-02-05 19:07 +0000
Re: Simple 2d C99 fractal plotter... Ian Collins <ian-news@hotmail.com> - 2019-02-06 08:12 +1300
Re: Simple 2d C99 fractal plotter... Keith Thompson <kst-u@mib.org> - 2019-02-05 12:49 -0800
Re: Simple 2d C99 fractal plotter... David Brown <david.brown@hesbynett.no> - 2019-02-05 22:39 +0100
Re: Simple 2d C99 fractal plotter... Keith Thompson <kst-u@mib.org> - 2019-01-27 13:09 -0800
Re: Simple 2d C99 fractal plotter... Bart <bc@freeuk.com> - 2019-01-26 18:53 +0000
Re: Simple 2d C99 fractal plotter... "Chris M. Thomasson" <ahh_f_it@crap.nothing> - 2019-01-26 18:21 -0800
Re: Simple 2d C99 fractal plotter... "Chris M. Thomasson" <invalid_chris_thomasson_invalid@invalid.com> - 2019-01-28 22:20 -0800
Re: Simple 2d C99 fractal plotter... "Chris M. Thomasson" <invalid_chris_thomasson_invalid@invalid.com> - 2019-01-28 22:55 -0800
Re: Simple 2d C99 fractal plotter... "Chris M. Thomasson" <invalid_chris_thomasson_invalid@invalid.com> - 2019-01-28 23:03 -0800
Re: Simple 2d C99 fractal plotter... "Chris M. Thomasson" <invalid_chris_thomasson_invalid@invalid.com> - 2019-02-06 22:37 -0800
Re: Simple 2d C99 fractal plotter... "Chris M. Thomasson" <invalid_chris_thomasson_invalid@invalid.com> - 2019-02-11 13:44 -0800
csiph-web