[TUHS] Is C obsolete? (was Re: [tuhs] The Unix shell: a 50-year view)

Clem Cole clemc at ccc.com
Tue Jul 6 23:05:19 AEST 2021


Exactly my point - *theory vs practice*.  It can be a petri dish, but that
is *not necessarily* a bad thing.  Different extended Pascal/Mod-2* et al *all
'fixed' the string data type in some manner (not even saying the
different solutions are good or bad).  But it always comes back to what was
(*is*) theory *vs*. practice.  As others have pointed out.  In the case of
Strings, you either made them more like C strings or you made them
basically useless - because, in practice, the null-terminated string works
pretty darned well for production code and can be made to be secure, but
the programmer can not be lazy.

Hey, I personally look like Pascal for what it is and I still think it's
the best teaching tool, particularly with Clancy and Cooper's book for
beginning programmers.  I personally learned both languages around the same
time, but I had already been writing in a number of assemblers, BASIC,
Fortran, Algol-W, SAIL, and BLISS before I saw either.  I've more written
way more C code than any other language --- why because it works and as a
professional, I know how to properly use it.

As bwk says in that same document which I pointed to earlier, "comparing C
and Pascal is the same as trying to compare a jetfighter with a Piper
Cub."  As my former Marine pilot B-I-L reminds me, he did not start pilot
training in Whidbey Island on jets - he worked his way up and showed he was
competent before the Navy made it easier for him to kill himself (and those
around him).  BTW: the Navy does not tend to try to land small prop planes
on the USS Kennedy either.  As my B-I-L says for all of his day and night
landings on same, he always somewhat scared the cr*p out him but he was
always careful to remember what he had been taught (and he says he never
had to use the 3 wire).

The bottom line becomes learning to pick and then using the proper tool for
the job and respect what is for and the constraints associated with using
it.

Clem
ᐧ

On Tue, Jul 6, 2021 at 12:35 AM Dan Stromberg <drsalists at gmail.com> wrote:

>
> On Mon, Jul 5, 2021 at 2:29 PM Clem Cole <clemc at ccc.com> wrote:
>
>>
>> On Mon, Jul 5, 2021 at 4:16 PM Dan Stromberg <drsalists at gmail.com> wrote:
>>
>>> A null-terminated array of char is a petri dish.  A proper string type
>>> is more like a disinfectant.
>>>
>> Hrrmpt.... maybe (in theory), but I can say that never seen it really
>> work in practice --  bwk in Why Pascal is Not My Favorite Programming
>> Language <http://www.lysator.liu.se/c/bwk-on-pascal.html> describes much
>> of the practical realities of this sort of choice:
>>
>
> I think language designers since Pascal have learned from Pascal's mistake
> there.
>
> Supposedly even Borland's TurboPascal had better strings than vanilla
> Pascal.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20210706/a49ad9dc/attachment.htm>


More information about the TUHS mailing list