:: Re: [DNG] Why C/C++ ?
Inizio della pagina
Delete this message
Reply to this message
Autore: Didier Kryn
Data:  
To: dng
Oggetto: Re: [DNG] Why C/C++ ?
Le 10/08/2024 à 15:33, Andreas Messer a écrit :
> Another, not very well known, ancient
> language used for embedded system programming is "ada".


   First Ada is not that ancient: it is newer than C (~: . Algol-60 was
the ancestor of Algol-68 which was the ancestor of Pascal, which was the
ancestor of Ada around the 80's. I saw a first manual in 1987, but there
was still no compilier at that time. I wrote a number of applications
and libraries in Ada2005. The standard continues to evolve.

    Ada is best known for what they call "programming in the large",
meaning big applications, but it is very good also at interfacing with
the hardware, and at interfacing to other languages, such as C, C++ and
Fortran. It has a very rich datatyping. It implements the C types just
for the purpose of interfacing.

    As an example, within a bitfield, you can declare that a sequence
of bits of whatever length is an integer, signed or unsigned, and
declare its endianness. You can mimic that in C, of course, but at the
cost of doing the marshalling yourself, which fills the source with
painfull and error-prone coding.

--     Didier