:: Re: [DNG] C vs ADA : advice sought
Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Johan Helsingius
Ημερομηνία:  
Προς: dng
Αντικείμενο: Re: [DNG] C vs ADA : advice sought
Then there is the halfway house between C and ADA - Go. Also inspired
by (besides C) Pascal, Oberon and Modula, but also Smalltalk and
occam...

    Julf


On 01/10/2024 16:41, Hendrik Boom wrote:
> On Mon, Sep 30, 2024 at 08:18:03PM -0500, o1bigtenor via Dng wrote:
>> Greetings
>>
>> The game thus far:
>>
>> 1. I asked why learn C vs python/micropython for embedded systems
>> (microcontrollers + more)
>>     There was a huge outpouring of learn C. (Thanks to those that
>> responded.)

>>
>> 2. Then I was asking for what to learn C from.
>>     Again there were quite a few responders (and I started digging into
>> books on C) .

>>
>> 3. So I'm continuing my digging around and poking my nose into all kinds of
>> exotic software
>>     corners then I find that it is possible to use ADA for programming
>> microcontrollers and
>>     embedded systems and there is a great deal of built in 'safety' so I
>> might be less likely to
>>     generate poor quality code.

>>
>> So the question:
>>
>> if I were to want to choose between learning C (and likely adding C++) and
>> learning ADA for programming microcontrollers and embedded systems what - -
>> - besides amount of usage would you use to advise me - - - which should I
>> learn (and why please (this is at least as important as your choice!!!))?
>
> Once you know either of these languages the other will be easier to learn.
> ADA is likely the better choice if you can choose the language to use.
> It is easier to write correct programs in Ada than in C.
>
> But C is much more widespread. And if you end up working for other people,
> you are more likely to have to work on existing code written in C
> than in Ada. And so you're more likely to have to know C than Ada.
>
> C is harder to use than Ada; it is closer to assembly language, and has many
> of the pitfalls of assembler.
>
> Why is C more widespread if it's worse for most applications than Ada?
> Because it was there first.
>
> Why is Ada a better language? Because it was designed long after a lot of
> experience with C and other early systems languages, and could benefit
> from accumulated knowledge. I was in regular communication with some of
> the designers back when they were putting Ada together. The primary
> goal was to build a language that would help programmers achieve
> reliable, efficient software.
>
> Which should you learn? I'd advise both. They have very different
> philosophies. Ada will give you a better idea of what should be possible.
>
> Use Ada on your own projects; use what your boss requires when you're
> working on his project.
>
> On the other hand, if you'd like to get the widest picture of what kinds
> of programming methods are possible, and are not concerned with
> immediate efficient application, I'd recommend a modern variant of Lisp,
> such as Racket, just to open your vision to a wider horizon. It can be fun.
> It's another way of thinking. But you'll likely not find a paid job where
> you're expected to use it.
>
> -- hendrik
> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng