Path: utzoo!attcan!uunet!husc6!purdue!mentor.cc.purdue.edu!l.cc.purdue.edu!cik From: cik@l.cc.purdue.edu (Herman Rubin) Newsgroups: comp.lang.misc Subject: Re: C's sins of commission Message-ID: <2627@l.cc.purdue.edu> Date: 10 Oct 90 14:30:41 GMT References: <151675@felix.UUCP> <64618@lanl.gov> <2883@igloo.scum.com> Organization: Purdue University Statistics Department Lines: 38 In article <2883@igloo.scum.com>, nevin@igloo.scum.com (Nevin Liber) writes: > In article <64618@lanl.gov> jlg@lanl.gov (Jim Giles) writes: > >It is my contention that future languages > >shouldn't have pointers at all. Not just no C-like pointers, none at > >all. I just picked on C as the most unpleasant example of what I'm > >against. > I really hate to agree with you Jim :-), but I'm beginning to think > that you are right. The only real argument I can see _for_ having > pointers is efficiency; more specifically, to help in > hand-optimisation. Extensions to C such as C++ are showing that > pointers aren't needed nearly as much as they use to be; heck, code > seems to be more readable w/o them. In languages such as Icon and > LISP I find that I don't even miss them. I must strongly object. When one considers what a variable or any other type of reference is, it is a pointer. Fortran originally only used pointers, as there was no call by value. I cannot imagine a language for mathematical use which does not have variable arrays, functions, etc. These are all expressed, consciously or not, as pointers. Now if one can have fixed pointers, why not variable pointers? We are no longer in the days when the only way to call a subroutine was to have the address in the instruction. One has to go through contortions in Fortran to use a subroutine which has a variable function or subroutine as an argument. Now there are developments in programming languages which should have been apparent way back when which may decrease the need for some uses of pointers, but why hobble the intelligent programmer? I have deliberately used arrays of pointers as the most convenient means of handling array refill procedures, and while I can find a way around it, it is clumsy and even less portable. -- Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907 Phone: (317)494-6054 hrubin@l.cc.purdue.edu (Internet, bitnet) {purdue,pur-ee}!l.cc!cik(UUCP)