Liste des Groupes | Revenir à se design |
On 10/16/2024 4:30 PM, Joe Gwinn wrote:I once had the suicidal job of choosing which language to write a>
large mass of code in. When my name was made public, the phone
immediately blew off the hook with special pleaders for the two
candidates, Pascal and plain K&R C. I'm doomed - no matter which is
chosen, there will be war. And blood.
Tee hee hee...
>We had performed something like six prior benchmarks studies that>
showed that compiled C code was 1.5 times faster than compiled Pascal
code, and Pascal had all sorts of awkward limitation when used to
implement large systems, in this case hundreds of thousands of lines
of code.
That is true of many languages and systems. *But*, is predicated on
the competency of the developers deployed. IMO, this has been the
bane of software for much of the past few decades... the belief that
you can just change some aspect of the paradigm and magically make
"better" developers out of people that really don't have the discipline
or skillsets for the job.
>
An average joe (no offense) can use a paint roller to paint a room
quicker than using a brush. But, that same person would likely
not notice how poorly the trim was "cut in", howmuch paint ended up
on windows, etc.
>
Will an average *coder* (someone who has managed to figure out how to
get a program to run and proclaimed himself a coder thereafter)
see the differences in his "product" (i.e., the code he has written)
and the blemishes/shortcomings it contains?
That didn't settle the issue, because the Ada mafia saw Pascal as the>
stepping stone to Ada nirvana, and C as the devil incarnate.
C is "running with scissors". You can either prohibit it *or*
teach people how to SAFELY run with scissors! The problem with
programming languages -- unlike scissors that tend to inflict injury
on the "runner" -- is the folks who are doing the coding are
oblivious to the defects they create.
I was still scratching my head about why Pascal was so different than>
C, so I looked for the original intent of the founders. Which I found
in the Introductions in the Pascal Report and K&R C: Pascal was
intended for teaching Computer Science students their first
programming language, while C was intended for implementing large
systems, like the Unix kernel.
Wirth maintained a KISS attitude in ALL of his endeavors. He
failed to see that requiring forward declarations wasn't really
making it any simpler /for the coders/. Compilers get written
and revised "a few times" but *used* thousands of times. Why
favor the compiler writer over the developer?
Prior operating systems were all written in assembly code, and so were>
not portable between vendors, so Unix needed to be written in
something that could be ported, and yet was sufficient to implement a
OS kernel. Nor can one write an OS in Pascal.
You can write an OS in Pascal -- but with lots of "helper functions"
that defeat the purpose of the HLL's "safety mechanisms".
This did work - only something like 4% of Unix had to be written in
assembly, and it was simply rewritten for each new family of
computers. (Turned out to be 6%.)
So the Pascal crowd fell silent, and C was chosen and successfully>
used.
The Ada Mandate was rescinded maybe ten years later. The ISO-OSI
mandate fell a year or so later, slain by TCP/IP.
I had to make a similar decision, early on. It's really easy to get
on a soapbox and preach how it *should* be done. But, if you expect
(and want) others to adopt and embelish your work, you have to choose
an implementation that they will accept, if not "embrace".
>
And, this without requiring scads of overhead (people and other
resources) to accomplish a particular goal.
>
Key in this is figuring out how to *hide* complexity so a user
(of varying degrees of capability across a wide spectrum) can
get something to work within the constraints you've laid out.
E.g., as I allow end users to write code (scripts), I can't
assume they understand things like operator precedence, cancellation,
etc. *I* have to address those issues in a way that allows them
to remain ignorant and still get the results they expect/desire.
>
The same applies to other "more advanced" levels of software
development; the more minutiae that the developer has to contend with,
the less happy he will be about the experience.
>
[E.g., I modified my compiler to support a syntax of the form:
handle=>method(arguments)
an homage to:
pointer->member(arguments)
where "handle" is an identifier (small integer) that uniquely references
an object in the local context /that may reside on another processor/
(which means the "pointer" approach is inappropriate) so the developer
doesn't have to deal with the RMI mechanisms.]
Les messages affichés proviennent d'usenet.