jahboater
Posts: 5173
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Programming Language of the Year 2019 - according to TIOBE

Tue Jan 07, 2020 11:29 pm

Still popular after 48 years ...

TIOBE Index for January 2020
January Headline: Programming Language C awarded Programming Language of the Year 2019

https://www.tiobe.com/tiobe-index//

Heater
Posts: 14687
Joined: Tue Jul 17, 2012 3:02 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Wed Jan 08, 2020 11:48 am

Interesting news. One can take such language popularity surveys with a pinch of salt but interesting the none the less.

The is an interesting comment on that page as to why C is on the rise again:

"Why is the programming language C still hot? The major drivers behind this trend are the Internet of Things (IoT) and the vast amount of small intelligent devices that are released nowadays. C excels when it is applied to small devices that are performance-critical. It is easy to learn and there is a C compiler available for every processor."

I have a theory .... One make can the hypothesis that the popularity and adoption of a language is largely determined by the popularity and adoption of some platform, no matter the pros and cons of the language itself vs other language. At any give time there are many languages one can use, but ones choice will be heavily influenced by the platform available and the language best supported by that platform.

Examples:

C - Back in the day Unix took the world by storm. Everyone wanted a decent operating system for their mini computers and work stations. C was the language of Unix. Ergo C became wildly popular and adopted.

ObjectiveC/Swift - In the world of the iPhone many people want to make apps for phones. ObjectiveC/Swift are thee languages of Apple Ergo C became wildly popular and adopted.

Java - As above but Android.

Javascript - Well, if you want to do smart things in a browser for the last decade or so you need Javascript, its the language of the browser platform

See the pattern there. It does not matter how brilliant your new language is. It's the platform that matters. Platforms dictate which language is used to a large extent.

So as pointed out, when all the world gets excited about the possibilities of IoT people adopt the language of the IoT platform. That is micro-controllers and the like. Guess what, the language of the micro-controller platform is C.

I don't know if it is significant but C is also a preferred language for the WEB browser as well today. One can easily compile C to WASM and have it run in the browser. Which many are doing to boost the performance of parts of their Javascript applications.
Last edited by Heater on Wed Jan 08, 2020 5:43 pm, edited 1 time in total.
Memory in C++ is a leaky abstraction .

User avatar
buja
Posts: 540
Joined: Wed Dec 31, 2014 8:21 am
Location: Netherlands

Re: Programming Language of the Year 2019 - according to TIOBE

Wed Jan 08, 2020 12:07 pm

Pi & Python is another combination?
Never heard of WASM before, but after looking it up I think it could be interesting (in combination with C).

Heater
Posts: 14687
Joined: Tue Jul 17, 2012 3:02 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Wed Jan 08, 2020 12:36 pm

buja,
Pi & Python is another combination?
That is an example. Although with the number of Pi in the world it has a pretty much negligible effect on statistics like the TIOBE index.

Python is a bit of an outlier in my theory, not having a specific platform driving it.
Never heard of WASM before, but after looking it up I think it could be interesting (in combination with C).
Oh no! What have I done?

I have had success compiling compute intensive code in C++ to WASM and incorporating it into web pages where it is used from JS. It's very easy to compile C and C++ to WASM using enscripten https://emscripten.org. As easy as compiling normally with GCC or Clang.

However my plan for WASM in the web, and else where, is to use Rust
https://www.rust-lang.org/
https://rustwasm.github.io/book/introduction.html

Rust gives one all the performance of C whilst providing memory safety and the high level luxuries of C++. Without the complexity and ugliness of C++.
Last edited by Heater on Wed Jan 08, 2020 9:26 pm, edited 1 time in total.
Memory in C++ is a leaky abstraction .

LdB
Posts: 1476
Joined: Wed Dec 07, 2016 2:29 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Wed Jan 08, 2020 1:45 pm

Heater wrote:
Wed Jan 08, 2020 11:48 am
I have a theory .... One make the hypothesis that the popularity and adoption of a language is largely determined by the popularity and adoption of some platform, no matter the pros and cons of the language itself vs other language.
You are close but in the embedded IOT market it is actually more simple.

Adoption of a language is largely determined by the support of the MCU vendor, no matter the pros and cons of the language itself vs other language.

Assembler and C are the only languages completely supported in the embedded market by every MCU vendor and nothing else is supported in the low end MCU's by the top 6 MCU vendors being NXP, Renesas, MicroChip, Samsung, ST and Toshiba. The only APP notes, Reference designs and code samples you will find from those companies will be in assembler or C. You want to use another language you are completely on your own and you will get zero support.

It does not matter how good or bad C is or what you think, if you want or need help from the MCU manufacturer you have no choice.

As an example, Embedded linux is actually having a bit of a surge in the embedded space based on the MCU manufactures supporting it.

Heater
Posts: 14687
Joined: Tue Jul 17, 2012 3:02 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Wed Jan 08, 2020 2:43 pm

LdB,
You are close but in the embedded IOT market it is actually more simple.
Close? I think we are saying the same thing. Thank you for expanding on what I meant by "platform" with respect to micro-controllers and IoT devices.

Sure enough, when you pick up a dev kit for an STM32 MCU or a ESP32 IoT device you find your self in the C world as that is what the vendor offers and supports well. As it happens pretty much all MCU/IoT vendors do that. That is the platform that demands C.
It does not matter how good or bad C is or what you think, if you want or need help from the MCU manufacturer you have no choice.
We are certainly in agreement on the general platform dictates language hypothesis. As hand waving as it is.

Would any one have had any reason to look at Swift if it were not pushed by Apple for their, very popular, platform? The hypothesis suggests that almost whatever language Apple had adopted would have gained the uptake of Swift.
Memory in C++ is a leaky abstraction .

hippy
Posts: 6836
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Programming Language of the Year 2019 - according to TIOBE

Wed Jan 08, 2020 4:44 pm

Heater wrote:
Wed Jan 08, 2020 12:36 pm
Python is a bit of an outlier in my theory, not having a specific platform driving it.
"PyBoard" which runs MicroPython.
Heater wrote:
Wed Jan 08, 2020 2:43 pm
when you pick up a dev kit for an STM32 MCU or a ESP32 IoT device you find your self in the C world as that is what the vendor offers and supports well. As it happens pretty much all MCU/IoT vendors do that. That is the platform that demands C.
Though there are plenty of third-parties who offer a Python, Javascript, lua or other environment and/or frameworks for using those devices which one can choose to use, which can be just as well supported as C.

In most cases C will be chosen because it's the path of least effort. Often because the Arduino IDE which supports those devices support C.

Most people are looking for that path of least effort. So, when someone has a C solution, that's what everyone else takes for themselves. If it were some other language they'd likely have taken that. Most people are standing on the shoulders of others and it becomes self-perpetuating.

It might be the worst language in the world for some things but, if someone already has a solution using it, that's what's going to get used.

In that respect "most popular" language is simply "most used", can be very different to "preferred" or "best" language.

Heater
Posts: 14687
Joined: Tue Jul 17, 2012 3:02 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Wed Jan 08, 2020 5:45 pm

hippy,
"PyBoard" which runs MicroPython.
Like I said, 'an outlier'. I don't think things like the PyBoard are driving the IoT tsunami going on just now.
Though there are plenty of third-parties who offer a Python, Javascript, lua or other environment and/or frameworks for using those devices which one can choose to use, which can be just as well supported as C.
Indeed there are. I have a bunch of different Esprunino Javascript devices here. Love'em. But again a drop in the ocean of the IoT tsunami.
Most people are looking for that path of least effort. So, when someone has a C solution, that's what everyone else takes for themselves. If it were some other language they'd likely have taken that... It might be the worst language in the world for some things but, if someone already has a solution using it, that's what's going to get used.
Looks like you agree with the hypothesis then.
Memory in C++ is a leaky abstraction .

Daniel Gessel
Posts: 119
Joined: Sun Dec 03, 2017 1:47 am
Location: Boston area, MA, US
Contact: Website Twitter

Re: Programming Language of the Year 2019 - according to TIOBE

Wed Jan 08, 2020 7:59 pm

Heater wrote:
Wed Jan 08, 2020 12:36 pm
Oh no! What have I done?

I have had success compiling computer intensive code in C++ to WASM and incorporating it into web pages where it is used from JS. It's very easy to compile C and C++ to WASM using enscripten https://emscripten.org. As easy as compiling normally with GCC or Clang.
Seriously, this looks scary cool! Had never heard of it. Thanks!

ejolson
Posts: 4452
Joined: Tue Mar 18, 2014 11:47 am

Re: Programming Language of the Year 2019 - according to TIOBE

Thu Jan 09, 2020 6:08 am

jahboater wrote:
Tue Jan 07, 2020 11:29 pm
Still popular after 48 years ...

TIOBE Index for January 2020
January Headline: Programming Language C awarded Programming Language of the Year 2019

https://www.tiobe.com/tiobe-index//
While quite an achievement in longevity, there is a hollowness in the C ecosystem that makes it difficult for people who have become experts in C to fix bugs in the compilers and generally contribute to the improvement of the language as a whole: C is no longer self hosting.

As with most types of dog food, the benefits that come from a compiler being self-hosting are difficult to overestimate. For example, the golang Go compiler was recently rewritten in Go, even though this meant a significant loss in performance. It would appear that providing a way for people interested enough to master a language the opportunity to use those same skills to improve the toolchain was that important.

On the other hand, when marveling at how well the GNU Compiler Collection and Clang/LLVM compilers work, one cannot help but notice that those systems are written in the C++ language. Some might claim there is little difference between C and C++, but if that were the case why was C++ used instead of C to create a C compiler?

jahboater
Posts: 5173
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: Programming Language of the Year 2019 - according to TIOBE

Thu Jan 09, 2020 9:18 am

ejolson wrote:
Thu Jan 09, 2020 6:08 am
On the other hand, when marveling at how well the GNU Compiler Collection and Clang/LLVM compilers work, one cannot help but notice that those systems are written in the C++ language. Some might claim there is little difference between C and C++, but if that were the case why was C++ used instead of C to create a C compiler?
Yes. I counted 37,345 C source files and 23,719 C++ source files in GCC 9.2

GCC stands for Gnu Compiler Collection, so it is not just a C compiler. It is a C++, Fortran, Objective C, Go, Ada compiler and so on. So if self hosting is a requirement what language does one choose?

I suspect given the complexity of some of these languages that the C front end is quite a small part of GCC.

Heater
Posts: 14687
Joined: Tue Jul 17, 2012 3:02 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Thu Jan 09, 2020 10:45 am

ejolson,
C is no longer self hosting.
One cannot really say that. C is only a language specification maintained by whatever ANSI committee. GCC and Clang/LLVM are examples of implementations of that standard. If you want a C compiler written in C I'm sure there are many. Tiny C for example: https://bellard.org/tcc/

If I understand correctly the thinking goes like this:

1) One wants compilers for L languages.

2) One wants to have them all generate code for P platforms.

3) So the total number of compilers required is L * P. That is a lot of work.

4) Better idea: Create L front ends and P code generators, put the bulk of the work into a blob in the middle. That's only work proportional to P + M + blob. Much better.

This has the great advantage that all the work that goes into optimization, the hard stuff, only has to be done once, in whatever language, and can be reused by all those compilers. Brilliant.

In the case of Rust the front end is written in Rust itself. No doubt this is true for others.

In fact there is Go compiler that uses LLVM https://blog.gopheracademy.com/advent-2 ... ir-and-go/
Memory in C++ is a leaky abstraction .

jahboater
Posts: 5173
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: Programming Language of the Year 2019 - according to TIOBE

Thu Jan 09, 2020 11:09 am

Heater wrote:
Thu Jan 09, 2020 10:45 am
In fact there is Go compiler that uses LLVM https://blog.gopheracademy.com/advent-2 ... ir-and-go/
It looks like GCC supports Go as well:

Code: Select all

   file.go
       Go source code.

   file.d
       D source code.

User avatar
buja
Posts: 540
Joined: Wed Dec 31, 2014 8:21 am
Location: Netherlands

Re: Programming Language of the Year 2019 - according to TIOBE

Thu Jan 09, 2020 2:43 pm

Heater wrote:
Thu Jan 09, 2020 10:45 am
ejolson,
C is no longer self hosting.
If you want a C compiler written in C I'm sure there are many. Tiny C for example: https://bellard.org/tcc/
Quote from the Tiny C website: "I am no longer working on TCC."
This seems to be the situation for many C (only) compilers.
Pelles C for the Windows platform is still alive (with C11 support).

hippy
Posts: 6836
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Programming Language of the Year 2019 - according to TIOBE

Thu Jan 09, 2020 3:21 pm

ejolson wrote:
Thu Jan 09, 2020 6:08 am
C is no longer self hosting.
So what does one now need to compile a latest spec C compiler ?

jahboater
Posts: 5173
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: Programming Language of the Year 2019 - according to TIOBE

Thu Jan 09, 2020 3:38 pm

hippy wrote:
Thu Jan 09, 2020 3:21 pm
ejolson wrote:
Thu Jan 09, 2020 6:08 am
C is no longer self hosting.
So what does one now need to compile a latest spec C compiler ?
A C and C++ compiler (GCC).
I use the one that comes with the OS (GCC 8.3 for Raspbian) to build the latest version.

The last stage of the build is to re-compile it all with the freshly built compiler.
That 1) tests the new compiler and 2) ensures the new compiler is as fast as possible with the latest optimization.

LdB
Posts: 1476
Joined: Wed Dec 07, 2016 2:29 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Thu Jan 09, 2020 4:00 pm

In GCC case a C++ compiler and it has been like that since GCC 4.8

If you needed to start from absolute scratch you bootstrap it by downloading GCC 4.8 and compile it on any C compiler.
It will build you a suitable C++ compiler :-)
You can then compile later versions of the GCC with the C++ compiler produced.

Most are unaware because all that detail is hidden behind the makefile you run to compile GCC.

It has however become an issue with some embedded MCU vendors because they can't support GCC versions beyond 4.8

As an example here is the version spit from the current Microchip XC16 for 16bit pic micros
gcc version 4.5.1 (XC16, Microchip v1.41) Build date: Sep 3 2019 (Microchip Technology)
It will be interesting to see if a new branch of GCC forms because of the issue to the vendors.

ejolson
Posts: 4452
Joined: Tue Mar 18, 2014 11:47 am

Re: Programming Language of the Year 2019 - according to TIOBE

Thu Jan 09, 2020 4:32 pm

LdB wrote:
Thu Jan 09, 2020 4:00 pm
It will be interesting to see if a new branch of GCC forms because of the issue to the vendors.
I remember bootstrapping early versions of gcc using the vendor C compiler on 32-bit Sun SPARC.

The fact that recent versions of gcc are the only compilers that can be used to compile the current gcc compiler is a weakness that could be exploited by a malicious deep-learning convolutional artificial intelligence to propagate a toolchain virus and topple the entire human empire. The Xcode malware that led to many infected programs on the iStore would seem a minor incident compared to undetected compromise of the GNU Compiler Collection, especially after humans are banished from any position with decision-making authority.

Personally, C has been my language of choice ever since Turbo Pascal went out of fashion. The main reason C continues to be productive for me is the C99 inclusion of complex data types and variable length, multidimensional arrays all of which are implemented by good optimising compilers.
Last edited by ejolson on Thu Jan 09, 2020 5:05 pm, edited 3 times in total.

hippy
Posts: 6836
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Programming Language of the Year 2019 - according to TIOBE

Thu Jan 09, 2020 4:50 pm

jahboater wrote:
Thu Jan 09, 2020 3:38 pm
A C and C++ compiler (GCC).
LdB wrote:
Thu Jan 09, 2020 4:00 pm
It has however become an issue with some embedded MCU vendors because they can't support GCC versions beyond 4.8
Thanks. I can comprehend the issue now.

Heater
Posts: 14687
Joined: Tue Jul 17, 2012 3:02 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Thu Jan 09, 2020 7:18 pm

hippy,
So what does one now need to compile a latest spec C compiler ?
A very good question.

If you want an egg you need a chicken. To get the chicken there must be an egg. To get the egg you need a chicken....

As noted above if you want a new GCC you need an old GCC to build it from. But where does that come from? You need an even older GCC to build that. But where did that come from.....

Eventually you are back at the first C compiler, written in assembler, for Unix. Whose descendants were used by Richard Stallman to create the first GCC.

Yeah, OK, you have to write an assembler to get that working. Not such a big deal I guess.

But to create that assembler you are going to get down to toggling instructions into memory via front panel switches or some such.

This could take some time.

I think I'm with ejolson here. In the same way that all our mathematics is built on axioms that date back to the Greeks, Euclid, and the like, we should be able to create a modern day GCC or LLVM from almost nothing. I fear this is not possible.

BUT, Tiny C shows that one man, Fabrice Bellard in this case, can create a C compiler in a reasonable amount of time.

I did not understand that part about embedded CPU vendors. I see no reason they cannot be supporting the latest GCC / LLVM and C/C++ standards.
Memory in C++ is a leaky abstraction .

Heater
Posts: 14687
Joined: Tue Jul 17, 2012 3:02 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Thu Jan 09, 2020 9:18 pm

jcyr,
Actuality, it did take quite some time. Some 50 years or so from men toggling front panels to filling web pages, from hand crafting assembler code to python.
Exactly.
What? Though I'm fairly aware of how an automobile works, should I also be able to build one?
Perhaps not.

Sometimes I lose sleep at night pondering questions like this:

What if by some freak accident we we lost all the source code and all the executables of everything we have stored magnetically/electronically? Perhaps an effect of a solar storm or nuclear war.

How would we get everything running again?

How would we bootstrap ourselves up from toggle switches to Python? Even if we had the source code of everything printed on paper or carved into stone.

To this end I like the C standard. Given a paper copy of that specification, one man or a few could get you a C compiler up and running in short order. Not so for C++ or Rust or whatever.

It's a silly thought of course. It's like asking what effort it would take to recreate all life on Earth as we know it after it has all been exterminated. You can't. You just have to wait a few million years for it to evolve again. If it ever does.

Aside from all that, I like the idea that possibly, maybe, there is a language system out there that can be bootstrapped to level of complexity of C or C++ or Rust, but starting from a simple run-time/interpreter I could write for myself in a week end.

Feed that tiny, stupid, kernel language the source code and it builds everything you require.

As far as I know there is no such thing.
Sure, but a TCC compiled Tatami solution runs in just under 4 minutes whereas an optimized GCC one runs in under 10 seconds on a Pi4.
Wow, TCC is doing very well. One man makes a compiler, hundreds of other guys spend thousands of man years and decades of elapsed time to make a compiler that is only 24 times faster!

Fabrice is a genius.
Memory in C++ is a leaky abstraction .

hippy
Posts: 6836
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 12:02 am

Heater wrote:
Thu Jan 09, 2020 9:18 pm
Aside from all that, I like the idea that possibly, maybe, there is a language system out there that can be bootstrapped to level of complexity of C or C++ or Rust, but starting from a simple run-time/interpreter I could write for myself in a week end.
It depends on where one starts from and where one wants to end up. Everything is an incremental improvement or change from the previous so we could get where we are now from nothing, just as we got here now. Probably not in a weekend.

I have written compilers in Basic just to prove it can be done, mostly to prove to those who say it isn't possible and Basic isn't suitable for 'proper tasks'. I have also written Basic interpreters in Assembler. So Basic interpreter in Assembler, a simple C or other compiler in Basic, and we're halfway there. I'd choose Basic, others might choose Forth, or other stepping stones. Maybe someone would jump straight in with a C or Pascal compiler written in Assembler.

Of course there's more to it than that. But notionally we could be rolled-back to any time and, wherever we end up, we could get ourselves to where we are now.

But the big question is would it be C or something else which emerges and dominates ? Is that just fluke ?

It's a lot like asking where we'd be if 'the other guy' had won some war or other. We'll never know.

LdB
Posts: 1476
Joined: Wed Dec 07, 2016 2:29 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 1:48 am

Heater wrote:
Thu Jan 09, 2020 7:18 pm
I did not understand that part about embedded CPU vendors. I see no reason they cannot be supporting the latest GCC / LLVM and C/C++ standards.
OOP as is mandated by C++ is a drop dead on many microcontrollers.

OOP support adds major complexities the concept of the self pointer, virtual method table and object code and data blocks.
It is built around the concept of the code execution being relocatable in some way.

On many small micros the program counter (PC) is not exposed and branch/jump instructions are absolute and/or very very limited relative range +-128 bytes etc. So you either can't have relocatable code or you would need so much code to support the ability to have relocatable execution that it is impossible to fit in the small device.

Many micros can only execute in ROM, you can't execute code in RAM they have different timings and may not even be on the same bus. They are built around RAM is for data, ROM is for execution. There are only a couple of ways to do a VMT under those conditions and depending on the statement above it may become very slow or impossible.

On your large CPU you take for granted that you can execute code in RAM and branch or jump everywhere your whole OS Windows or Linux is built around it. You load your app into memory from hard drive and then execute it :-)

Heater
Posts: 14687
Joined: Tue Jul 17, 2012 3:02 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 2:30 am

LdB,
OOP as is mandated by C++ is a drop dead on many microcontrollers.

OOP support adds major complexities the concept of the self pointer, virtual method table and object code and data blocks.
It is built around the concept of the code execution being relocatable in some way.
I guess it depends on how much OOP you want.

Some years ago I made a little C++ program that had a class and instantiated a bunch of objects from it, then did some simple processing on those objects. I made the equivalent in C using a struct and passing a pointer to the struct as the first parameter to the functions I had there.

I was expecting to demonstrate that the generated C++ code was about the same size as the C. To my surprise I found the generated C++ code was exactly the same, byte for byte, as the C!

Ergo, if you want to do that kind of thing the 'self' pointer is zero overhead.

I did not try it but I'm sure you are right, virtual methods and dynamic dispatch is off the table in many situations.

Still, there are many advantages to using C++ even for tiny machines, even without using OOP.
On your large CPU you take for granted that you can execute code in RAM and branch or jump everywhere your whole OS Windows or Linux is built around it. You load your app into memory from hard drive and then execute it
Me?

I'm old school. All this running from RAM and virtual memory is still new to me :) I was weaned on embedded systems where all code was burned into PROM/EPROM and ran from there.
Memory in C++ is a leaky abstraction .

ejolson
Posts: 4452
Joined: Tue Mar 18, 2014 11:47 am

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 4:56 am

Heater wrote:
Fri Jan 10, 2020 2:30 am
I guess it depends on how much OOP you want.

Some years ago I made a little C++ program that had a class and instantiated a bunch of objects from it, then did some simple processing on those objects. I made the equivalent in C using a struct and passing a pointer to the struct as the first parameter to the functions I had there.

I was expecting to demonstrate that the generated C++ code was about the same size as the C. To my surprise I found the generated C++ code was exactly the same, byte for byte, as the C!
Even if you don't use or want very much object-oriented programming, I suspect the difficulty is that a working C++ compiler needs to be able to create all those those data structures and objects, just in case, and this is not possible for certain classes of micro-controllers. Oh well, I read that people are working on adding a wrapper library to the Linux kernel that allows coding loadable modules in Rust.

Since a high-quality open-source optimizing compiler and operating system is a threat to the business model of hardware lock-in practiced by some manufacturers, those manufacturers have become generous with funds and manpower for improving the tool chain to the point it become so complicated it can no longer be retargeted easily to new computer architectures. While, the resulting piles of code also become difficult to maintain or audit for correctness and security, nobody wants to give up the performance advantages.

Some time ago there was a thread about creating a new compiler for the Raspberry Pi simple enough that a single person could write it as well as audit it for security issues.

https://www.raspberrypi.org/forums/view ... 4&t=210741

While all compilers (except perhaps Rust) start out simple, the reason a new project is needed (presumably) is because all previous projects have either been abandoned or improved to the point they are no longer simple enough for one person to understand. Along similar lines, some blogger recently noticed

https://telegra.ph/Why-OpenBSD-is-margi ... ible-12-05

that operating system kernels need to place reasonable limits on total lines of code in order to maintain human-verifiable quality and security. If you actually read the above blog, please note the Windows kernel is not really 500 million lines nor is OS X so revolutionary.

Back to the programming language of the year, one difficulty with C is that the grammar itself has LR conflicts and requires a context sensitive lexer just for the parsing.

http://trevorjim.com/c-and-cplusplus-ar ... text-free/

This additional complexity doesn't promote the goal of creating a compiler simple enough for one person to understand. Still, it's difficult to argue with 48 years of success.

Return to “C/C++”