Article View: comp.std.c
Article #6276Re: Making C a little more 'foolproof' (was Re: Naming)
From: Johan Vromans
Date: Sat, 03 Mar 1990 06:25
Date: Sat, 03 Mar 1990 06:25
28 lines
1874 bytes
1874 bytes
In article <681@mwtech.UUCP> martin@mwtech.UUCP (Martin Weitzel) writes:
> IMHO, there's a big 'philosophical' difference between languages like
> C, which obliges the programmer to do *all* error checking (namely for
> "fopen", "malloc" a.s.o., which may only fail under 'unusual conditions')
> and PASCAL, which does much more 'holding hands' at the cost, that the
> programmer has no chance to regain control, if a FILE cannot be opened,
> a NEW cannot make memory available a.s.o.
[ and much more ]
A very elegant approach was taken in the early 70's in Burroughs
Extended Algol. Some operations allowed multiple levels of control,
e.g.:
READ(INFILE,COUNT,BUFFER)
-> if something goes wrong, the system would trap it
READ(INFILE,COUNT,BUFFER)[EOF]
-> EOF handled by program, others by system
RESULT := READ(INFILE,COUNT,BUFFER)
-> complete control by the program
Real powerful language. They don't make them like that these days.
Johan
--
Johan Vromans jv@mh.nl via internet backbones
Multihouse Automatisering bv uucp: ..!{uunet,hp4nl}!mh.nl!jv
Doesburgweg 7, 2803 PL Gouda, The Netherlands phone/fax: +31 1820 62944/62500
------------------------ "Arms are made for hugging" -------------------------
Technical Details
Message-ID:
<JV.90Mar2232515@mhres.mh.nl>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!mhres!jvReferences:
<MCDANIEL.90Feb20172440@orenda.amara.uucp> <1990Feb23.184656.3110@siia.mv.com> <16021@haddock.ima.isc.com> <MCDANIEL.90Feb27103 <681@mwtech.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!mhres!jv From: jv@mh.nl (Johan Vromans) Newsgroups: comp.std.c Subject: Re: Making C a little more 'foolproof' (was Re: Naming) Message-ID: <JV.90Mar2232515@mhres.mh.nl> Date: 3 Mar 90 06:25:14 GMT References: <MCDANIEL.90Feb20172440@orenda.amara.uucp> <1990Feb23.184656.3110@siia.mv.com> <16021@haddock.ima.isc.com> <MCDANIEL.90Feb27103 <681@mwtech.UUCP> Sender: jv@mhres.mh.nl Organization: Multihouse Gouda, the Netherlands Lines: 28 In-reply-to: martin@mwtech.UUCP's message of 1 Mar 90 11:22:06 GMT