🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #5019

Re: Modern langauges

#5019
From: Erland Sommarskog
Date: Thu, 31 Dec 1987 22:06
93 lines
5241 bytes
To appreciate a modern langauge you must be a modern programmer.
Some of the arguments Mr. Pase presents, and of which we have
and will see many times, seems just as conservative as those
that must have been around when assembler vs. Fortran was the issue.

Douglas M. Pase (pase@ogcvax.UUCP) writes:
>Erland Sommarskog (sommar@enea.UUCP) writes:
>>Why I find C archaic? Let me just say I think that a good language
>>should save you many mistakes as early as possible.
>
>This is a noble goal.  A major problem with this is the definition of what
>constitutes a 'mistake'.  Stuffing a 16 bit value into an 8 bit slot under
>some circumstances may constitute an error.  Other times it may not.
>Explicitly specifying what should be obvious semantically causes programs
>to be verbose and tedious, both to read and to write.

Even more tedious is the work to find the bug caused by such a mistake, 
which ought to be caught by the compiler or a run-time check. As for
reading, I think the explicit type conversions help understanding what's
happening.

>Overrunning the end of an array is usually accepted as an error.  BUT,
>allowing array bounds to be determined at runtime can also be an extremely
>useful feature.  It allows more flexible and efficient usage of memory.

A modern language should of course allow dynamic arrays. So does Ada.
Checking array bounds at compile time can only be done in rare cases,
since even the array size is static, the index is not. 

>array definition are difficult to put together, and runtime bound checks are
>expensive in terms of efficiency.

This, I'd say, is an really old-fashioned argument. In these days
when hardware is cheaper than software, buy faster software, don't
remove the array checks. Believe, you save the money just in having
the program crash on array overrun, than searching for those funny
errors caused by having data unexpectly over-written.

>Another source of criticism is features which at times may be useful, at
>other times may be hazardous.  C takes a liberal view of the world.  It assumes
>(sometimes rashly) that the programmer knows what s/he is doing.  The saw that

And this is just so wrong, wrong, wrong! We have lived with computers so
long that we know that programmers very often only are just dimly aware
of what they are doing. Or do you really believe in bug-free software?

>>Modern languages, but still in the 3rd generation, are for example
>>Ada, Modula-2 and Eiffel.
>      ^^^^^^^^
>Modula-2 is hardly a modern language, at least in the sense that it brings any
>new ideas with it.  It is a rather poor extension of a language which, in its
>purest form, is overly simple.  It is closer to a repackaging of an older

You may be very right here. I have only read through Wirth's book once,
and it's true, it's really just another Pascal dialect. Why I mentioned
it at all will be apparent below.

>Ada has much in its favor, but also its share of problems.  I know nothing of
>Eiffel.

Eiffel is *very* modern, at least with respect to its age. 2 years and 3
months by now. Check out comp.lang.ada where Bertrand Meyer, the father
of the language, mentioned some on it in an article recently. 

>I agree, C is a low level language, at least in the sense that it gives you
>a programming model which is still very close to the machine.  It was intended
>to be that way.  It will never replace higher level languages.  It was not
>intended to.  I don't use C when I should use Lisp, APL, SmallTalk, ML, or
>Prolog.  This shouldn't be a supprise to anyone -- I don't use a hammer to cut
>boards, either.

Yes, but here is the big big big problem. There are many many people
who belives it does. If C only where used instead for assembler in
low-level applications, I wouldn't mind. But this it used more wider
than so. I work as a consultant and there seems to be many customers
that have decided to use C in all their further development and may be
even will convert old code. Why? I don't know their motives, but I can
guess. The want something standardized so they can change hardware
without to much influence on the software. That doesn't many leave 
languages. Pascal is useless without extensions, and they are non-
standardized. Often their processors are micros, so Ada may not, 
today, be realistic. 
  But C is quite standardized and quite available. The only alternative
I could think of is Modula-2, however, I am not sure whether it's
generally available for an aritrary processor. Neither do I know
whether it's standardized enough. I have some suspicions against
the I/O, which is not part of the language.
  
-- 
Erland Sommarskog       
ENEA Data, Stockholm    
sommar@enea.UUCP        
                   C, it's a 3rd class language, you can tell by the name.
Technical Details
Message-ID: <2570@enea.se>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!mcvax!enea!sommar
References: <enea.2553> <1520@ogcvax.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!mcvax!enea!sommar
From: sommar@enea.se (Erland Sommarskog)
Newsgroups: comp.lang.misc
Subject: Re: Modern langauges
Message-ID: <2570@enea.se>
Date: 31 Dec 87 22:06:46 GMT
References: <enea.2553> <1520@ogcvax.UUCP>
Reply-To: sommar@enea.UUCP(Erland Sommarskog)
Followup-To: comp.lang.misc
Organization: ENEA DATA Svenska AB, Sweden
Lines: 93