Earlier quoted context omitted.
Yep, you see it also in the split away from Qt (C++) to GTK (C).
GTK is polyglot.
GNU Coding Standards: Writing Robust Programs
51–60 of 111 posts
Re: GNU Coding Standards: Writing Robust Programs
#52Earlier quoted context omitted.
Would you say that the predominance of C++ rather than C in FLOSS would have a net positive result?
Yes, because while it isn't fullproof due to copy-paste compatibility with C89, at least it offers better tooling for safer coding, provided one doesn't code "C with C++ compiler". Namely: - proper string and vector types (most compilers allow to enable bounds checking anyway) - stronger rules for type conversions - reference types for parameters - better tooling for immutable data structures - memory allocation prim…
Re: GNU Coding Standards: Writing Robust Programs
#53I see that they still say: >>> Please don’t use “win” as an abbreviation for Microsoft Windows in GNU software or documentation. In hacker terminology, calling something a “win” is a form of praise. You’re free to praise Microsoft Windows on your own if you want, but please don’t do so in GNU packages. Please write “Windows” in full, or abbreviate it to “w.” But they have removed some other guidance: >>> Instead of a…
GNU has always had that childish tinge to its writings. Chief GNUsance and all that.
Re: GNU Coding Standards: Writing Robust Programs
#54I hate that formatting style personally.
Re: GNU Coding Standards: Writing Robust Programs
#55Earlier quoted context omitted.
auto_ptr (precursor to unique_ptr) was first proposed for standardisation in 1994 [0], and there was probably non standard versions of it before 94. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/1994/N055...
ok then, nobody was using auto_ptr in the 90s.
Re: GNU Coding Standards: Writing Robust Programs
#56Earlier quoted context omitted.
On the contrary, - proper string and vector types (most compilers allow to enable bounds checking anyway) - stronger rules for type conversions - reference types for parameters - better tooling for immutable data structures - memory allocation primitives instead of getting sizeof wrong to malloc() - collection library instead of reinventing the wheel in each project - RAII - smart pointers - templates instead of erro…
All of which were heavy enough at the time to slow programs down enough that people chose to not use them in favor of faster, more portable C.
Re: GNU Coding Standards: Writing Robust Programs
#57Earlier quoted context omitted.
On the contrary, - proper string and vector types (most compilers allow to enable bounds checking anyway) - stronger rules for type conversions - reference types for parameters - better tooling for immutable data structures - memory allocation primitives instead of getting sizeof wrong to malloc() - collection library instead of reinventing the wheel in each project - RAII - smart pointers - templates instead of erro…
I'm more interested in the the actual statistics for security vulnerabilities found in C vs. C++ programmes, rather than theoretical benefits one language might have over the other.
Re: GNU Coding Standards: Writing Robust Programs
#58Earlier quoted context omitted.
In part yes. Had GNU/Linux not taken off, in the alternative universe from Windows, BeOS, Mac OS, OS/2, commercial UNIX (remember Motif++ and CORBA?) would kept writing the software in C++, instead of caring about creating FOSS stuff in C. GNOME vs KDE is a good example of that schism and language wars.
I remember CORBA. Oh, god, do I remember CORBA. I wish I could forget CORBA.
Re: GNU Coding Standards: Writing Robust Programs
#59Earlier quoted context omitted.
None of that was a thing in 90s and early 00s.
auto_ptr (precursor to unique_ptr) was first proposed for standardisation in 1994 [0], and there was probably non standard versions of it before 94. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/1994/N055...
In 1992, I was working on the Taligent project, probably the first major C++ operating system. (It failed.) I remember when the ARM came out---none of the compilers we had available could really do templates. Or namespaces.
Re: GNU Coding Standards: Writing Robust Programs
#60> When you want to use a language that gets compiled and runs at high speed, the best language to use is C. C++ is ok too, but please don’t make heavy use of templates. So is Java, if you compile it. Back in the early days, this sentence was more like "When you want to use a language that gets compiled and runs at high speed, the best language to use is C." . So we switched from a path where all major desktop environ…
That sounds backwards to me. It wasn't a "manifesto" that caused that "surge", it was the actual software being written.
Free software beat the world. Free (system) software is overwhelmingly written in C. At least part of an argument like this needs to nod to the fact that free software written in C beat the world because... C was a better choice? Certainly it was in the 90's.