Article View: comp.lang.misc
Article #2395Re: Pointers
From: Herman Rubin
Date: Fri, 13 Nov 1992 14:13
Date: Fri, 13 Nov 1992 14:13
24 lines
1843 bytes
1843 bytes
In article <1992Nov12.203014.11596@newshost.lanl.gov> jlg@cochiti.lanl.gov (J. Giles) writes:
>If the only things you can do with a pointer are to dereference it,
>pass it as a procedure argument, or assign it from another of the same
>type, then you never needed the pointer to begin with. What you needed
>was for the data type to which it points to be a first-class type.
>Dr. Rubin's use of pointers to functions is exactly of that form.
>He can do nothing with them except dereference, pass, or assign them.
>He would actually get *greater* capability if the language he used
>allowed `function' to be a first-class data type with assignment,
>partial application (currying), and composition as it's defined
>operations.
Even if you have the greater capablility, do you have to insist on
making things complicated by using it? I use pointers both for
functions and for descriptors. I use pointers to get a more powerful
version of COMMON blocks. I use pointers because any non-brain-damaged
machine uses them. In fact, Fortran (at least up to F77) uses only
pointers, but all pointers are fixed!
--
Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
Phone: (317)494-6054
hrubin@snap.stat.purdue.edu (Internet, bitnet)
{purdue,pur-ee}!snap.stat!hrubin(UUCP)
Technical Details
Message-ID:
<BxnrI0.10M@mentor.cc.purdue.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!ames!purdue!mentor.cc.purdue.edu!pop.stat.purdue.edu!hrubinReferences:
<BxJzzv.4H7@mentor.cc.purdue.edu> <721539019@sheol.UUCP> <1992Nov12.203014.11596@newshost.lanl.gov>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.misc Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!ames!purdue!mentor.cc.purdue.edu!pop.stat.purdue.edu!hrubin From: hrubin@pop.stat.purdue.edu (Herman Rubin) Subject: Re: Pointers Message-ID: <BxnrI0.10M@mentor.cc.purdue.edu> Sender: news@mentor.cc.purdue.edu (USENET News) Organization: Purdue University Statistics Department References: <BxJzzv.4H7@mentor.cc.purdue.edu> <721539019@sheol.UUCP> <1992Nov12.203014.11596@newshost.lanl.gov> Date: Fri, 13 Nov 1992 14:13:11 GMT Lines: 24