I am a Java developer, and I rarely write GUI program in C. However, I noticed that many GNU’s projects, such as PSPP, R, Dia, etc., are written in C, instead of Java or C++.
I personally don’t mind this, but I am really curious why GNU favors C so much. My understanding is that C is the one that supports the least in object-oriented programming, and today’s CS education really emphasizes OOP, as OOP really makes codes more reusable. In this case, why would so many developers choose to develop in C instead of C++ or Java.
Does anyone know why GNU’s software are so exclusively written in C? Do you think or GNU’s software should be written in C++ or Java so that the source code could be more useful to people? Why or why not?
5
The primary reason is because C is the lingua franca of software, the GNU project has been around for quite some time and the GNU project and FSF, above else, value freedom of their software over any other consideration. Performance, modularity, code ‘elegance’, bug fixes, etc, all take a back seat to software freedom as far as the GNU project is concerned.
For much of GNU’s history, C was the only language available that could fulfill that goal. The GNU project began IIRC in 1984. One of the initial development efforts was to make a GNU toolchain, and C was the obvious choice. Depending on a proprietary compiler beyond the short-term was unacceptable, and C ia a simple yet very effective language that was suitable for general purpose software development, and thus a reasonable target for the initial GNU compiler.
In the meantime, C++ was only a year old, and it would still be many years until dependable compilers were even available, and it wasn’t until 1987 that GCC came around, and it didn’t have C++ capability until a year after that. For many years, Java was a “trap”, in that all Java software required a non-free runtime in order to execute, so Java was not an option, even if it had existed at the time.
2