🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #39

Re: Pointers

#39
From: Herman Rubin
Date: Wed, 04 Nov 1992 21:42
53 lines
3521 bytes
In article <1992Nov4.093545.15950@rdg.dec.com> jch@rdg.dec.com (John Haxby) writes:
>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...) .

This ignores far too much.  The current high-level languages provide SOME
of the tools to do SOME of the jobs.  Any good tool can be misused.  In
my estimation, more than 90% of the uses of statistics are by people who
do not have the slightest idea what they are doing, and it is only that
it usually does not matter that saves the situation.  Any statistical
computer package is far more dangerous than the use of pointers.

Now a knife, or a gun, can be used for good or evil.  They can cause
accidents.  Likewise with pointers.

>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.

Now how would you call a function, whose name you do not know, and even
whose address is inserted into a communications block by a separately
produced part of the program?  I very definitely anticipate such as a
key item of any good random number package.  How do you insert your
return address so that an exception handler will know how to get back?
How do you access an array in a separately compiled part of the program?
Common blocks are one way, but communication blocks and pointers are
far more flexible, and have the advantage that no complicated loading
problems occur.  

Computer hardware quite properly uses pointers, and any software that
does not is just making life difficult for the users.
-- 
Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
Phone: (317)494-6054
hrubin@pop.stat.purdue.edu (Internet, bitnet)  
{purdue,pur-ee}!pop.stat!hrubin(UUCP)
Technical Details
Message-ID: <Bx7oAz.7Lp@mentor.cc.purdue.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!ukma!wupost!spool.mu.edu!news.nd.edu!mentor.cc.purdue.edu!pop.stat.purdue.edu!hrubin
References: <1992Nov3.130634.26112@rdg.dec.com> <1992Nov4.031026.23624@linus.mitre.org> <1992Nov4.093545.15950@rdg.dec.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!ukma!wupost!spool.mu.edu!news.nd.edu!mentor.cc.purdue.edu!pop.stat.purdue.edu!hrubin
From: hrubin@pop.stat.purdue.edu (Herman Rubin)
Subject: Re: Pointers
Message-ID: <Bx7oAz.7Lp@mentor.cc.purdue.edu>
Sender: news@mentor.cc.purdue.edu (USENET News)
Organization: Purdue University Statistics Department
References: <1992Nov3.130634.26112@rdg.dec.com> <1992Nov4.031026.23624@linus.mitre.org> <1992Nov4.093545.15950@rdg.dec.com>
Date: Wed, 4 Nov 1992 21:42:34 GMT
Lines: 53