[NCLUG] A brief note about C and potential successors.
Brian Sturgill
bsturgill at ataman.com
Fri Jan 17 18:49:17 MST 2020
Interesting what you said about C and Arduino.
My first major programming job was writing admissions software on a PDP
11/10 running V6 Mini Unix.
The 11/10 did not have separate I and D spaces, so user programs had to fit
in 32K bytes of memory.
This computer was sized similarly to the original machines C was made for.
The compiler ran fine there, but you had to be careful to use short
variable names or you ran out of memory.
I actually have the system source code around somewhere, I'll look into
bringing it for "show and tell".
People at that time would say you're crazy to to be using C in such a small
amount of memory.
Yet the whole multi user operating system (95% written in C) fit in 20K.
Now consider Arduinos. I normally use ESP8266-based chips.
These have 32K instruction, 32K instruction cache, 80K user-data, 16K
system data
Or about 4 times the memory of the PDP 11/10.
It also has the ability to execute instructions and pull data from a 4Mb
flash RAM.
Making it in practice more than an order of magnitude more memory.
The processor is many times faster than the PDP 11/10.
The PDP 11/10 was multi-user... we regularly ran 2 users at a time there.
Arduinos are single program chips and only load the parts of the limited OS
it needs.
My point here is if it was reasonable to run C on the 11/10, why is Go or
Rust or Swift unreasonable on these "tiny" chips now?
Brian
On Fri, Jan 17, 2020 at 5:50 PM Bob Proulx <bob at proulx.com> wrote:
> Brian Sturgill wrote:
> > I asked about Go usage at the last meeting and was met with quite a
> number
> > of people expressing disdain that I thought C should be replaced.
>
> I think people were mostly focused on the Arduino part. Since the
> topic of C was introduced as running C on an Arduino. At that point
> we were all thinking "Arduino!"
>
> Because I know at least half of the comments were coming from people
> like me that have spent some time learning both Go-lang and Rust and
> other languages. I don't think people were disparaging those
> languages. And in fact for me when I am just trying to solve a random
> problem I reach for a memory safe garbage collected language, I won't
> say it but most of you know which one, most of the time.
>
> I love the C language but recognize that I am not always working alone
> and must work on a team with other people and as I have often said,
> other people are almost always the problem. :-)
>
> Old sayings, adapted for modern times:
>
> The Rust programmer says memory is too important to be left to the
> system. The programmer should have full control of it.
>
> The Go-lang programmer says memory is too important to be left to the
> programmer. The system should have full control of it.
>
> And the interesting thing is that *both* viewpoints are correct!
>
> Bob
> _______________________________________________
> NCLUG mailing list NCLUG at lists.nclug.org
>
> To unsubscribe, subscribe, or modify
> your settings, go to:
> http://lists.nclug.org/mailman/listinfo/nclug
--
Brian
More information about the NCLUG
mailing list