🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #35

Re: Pointers

#35
From: John Haxby
Date: Wed, 04 Nov 1992 09:35
33 lines
2179 bytes
In article <1992Nov4.031026.23624@linus.mitre.org>, crawford@boole.mitre.org (Randy Crawford) writes:
|> Sure they do.  Pointers are not just variables, they're polymorphic 
|> placeholders.  When you want an identifier that can be an integer, 
|> a function, or a port, you use a pointer.  You want to return a 
|> function from a function?  You can do it in C -- you return a pointer.  
|> You want to define your own objects (or packages) with member functions, 
|> you can do it with structures and pointers.

Well, I could go on to say that other languages provide exactly
this but in a `safe' fashion that makes it hard to hang yourself, but
I won't.

The problem with a simple, overloaded, mechanism for doing all
the good things that come part and parcel with languages like Algol 68,
CLU and others, is that it leads to mistakes.  Usually mistakes that
are hard to find.  High-level languages let you concentrate on solving
the problem rather that building the mechanisms to solve the problem
(by which time you've forgotten what the problem was...) .

C pointers take an awful lot of stick (probably justifiably), but they
are the visible symptom of a language that is not terribly helpful.  Now
I'm going to go and beat the living daylights out of a 1000 line C
program that I can't write, let alone test!   I think I'll give up and
bite the bullet for support in CLU or learn enough Modula 3.


-- 
John Haxby, Definitively Wrong.
Digital				<jch@rdg.dec.com>
Reading, England		<...!uknet!wessex!jch>

----------------------------------------------------------------
The opinions expressed herein are my own, not my employers.
Technical Details
Message-ID: <1992Nov4.093545.15950@rdg.dec.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!elroy.jpl.nasa.gov!decwrl!pa.dec.com!rdg.dec.com!jch
References: <1992Nov2.083810.1652@syacus.acus.oz.au> <Bx3BsH.I0J@mentor.cc.purdue.edu> <1992Nov3.130634.26112@rdg.dec.com> <1992Nov4.031026.23624@linus.mitre.org>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!elroy.jpl.nasa.gov!decwrl!pa.dec.com!rdg.dec.com!jch
From: jch@rdg.dec.com (John Haxby)
Subject: Re: Pointers
Message-ID: <1992Nov4.093545.15950@rdg.dec.com>
Sender: news@rdg.dec.com (Mr News)
Organization: Digital Equipment Corporation
References: <1992Nov2.083810.1652@syacus.acus.oz.au> <Bx3BsH.I0J@mentor.cc.purdue.edu> <1992Nov3.130634.26112@rdg.dec.com> <1992Nov4.031026.23624@linus.mitre.org>
Date: Wed, 4 Nov 1992 09:35:45 GMT
Lines: 33