TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ALL
from: =?UTF-8?Q?BJ=C3=B6RN_LUND
date: 2019-02-25 21:02:00
subject: Re: C is not a low level

Den 2019-02-25 kl. 04:59, skrev Gene Wirchenko:
> On Sun, 24 Feb 2019 07:56:27 +0000, Ahem A Rivet's Shot
>  wrote:
>
> [snip]
>
>>  For anything I/O bound I prefer Python, Perl or Java (but not
>> 'enterprise' Java with all the trimmings and cruft - the language is good
>> but the cruft is ... well cruft). Readability, maintainability and speed of
>> development are all more important than raw efficiency - most especially
>> maintainability. It is no good having code a tenth the size and ten times
>> faster if the first time someone less careful works on it dangerous hidden
>> bugs appear because handling pointers and raw memory requires care.
>
>       I prefer a language that is human-oriented.  I would rather have
> something run a bit more slowly but be safer.  Most of the time, it
> does not matter (to me or mine) much anyway.  If it does, then I worry
> about optimisation.


I konw of only one language with explicit design goals of
"program reliability and maintenance, programming as a human activity,
and efficiency"

http://archive.adaic.com/standards/83lrm/html/lrm-01-03.html

or as
https://www.radford.edu/nokie/classes/320/designGoals.html
says

1 Supporting reliability and maintainability
     * Large programs with long lifetime
2 Efficiency (minimize execution speed and space)
3 Concern for programmer: Language is small and consistent
     * Readability favored over writability


>
>>  It is also worth noticing that just because the language is low
>> level and permits high efficiency there's no guarantee of efficient
>> programs, all too many programmers start coding and stop designing far too
>> soon and wind up using very bad algorithms or optimising the wrong things
>> producing twisty masses of C code that once you understand what they're
>> supposed to achieve can be replaced by short pieces of clear python that
>> *are* ten times smaller and run ten times faster or slightly longer pieces
>> of C that are *slightly* faster than the python but harder to maintain.
>
>       Exactly.  I write something reasonable; it usually is fast
> enough.  If not, only then I optimise.


My favorite link in this respect is this
https://www2.seas.gwu.edu/~adagroup/sigada-website/lawlis.html


Abstract

With the intent of getting an Ada waiver, a defense contractor wrote a
portion of its software in Ada to prove that Ada could not produce
real-time code. The expectation was that the resultant machine code
would be too large and too slow to be effective for a communications
application. However, the opposite was verified. With only minor source
code variations, one version of the compiled Ada code was much smaller
while executing at approximately the same speed, and a second version
was approximately the same size but much faster than the corresponding
assembly code.


....



sudo apt install gnat-6

will get you far on the pi

(gnat is the gcc frontend to Ada)

--
Björn

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.