Path: utzoo!attcan!uunet!bywater!arnor!lusitania!lowry From: lowry@arnor.uucp Newsgroups: comp.lang.misc Subject: Re: C's sins of commission Message-ID: <1990Oct8.135551.21639@arnor.uucp> Date: 8 Oct 90 13:55:51 GMT References: <64618@lanl.gov) <2883@igloo.scum.com) <2171@enea.se> Sender: news@arnor.uucp (NNTP News Poster) Reply-To: lowry@lusitania.watson.ibm.com (Andy Lowry) Organization: IBM T. J. Watson Research Center Lines: 48 In article <2171@enea.se>, sommar@enea.se (Erland Sommarskog) writes: |> Nevin Liber (nevin@igloo.UUCP) writes: |> )Jim Giles (jlg@lanl.gov) 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; |> |> I must be missing some context here, else this doesn't make sense. |> Of course pointers are a necessary thing. Then it's an issue whether |> you make them explicit like in C, Ada or Pascal, or hide them a |> little and call them references like in Eiffel. Or hide them COMPLETELY, like in Hermes (a language for distributed computing that has been designed and implemented in prototype form by my group). The Hermes programmer has NO notion of pointer in any of its various guises. There is NO way for the programmer to specify aliasing or shared data of any kind. We provide high-level data types called "tables" that subsume most of the uses that pointers are traditionally put to (linked data structures, character strings and other arrays). Hermes uses output ports (connections to message queues called input ports) as capabilities, so passing these around subsumes the need for passing around function pointers. I personally have written a great deal of code in Hermes and have found the lack of pointers to be no hindrance. In fact, the level of compile-time checking provided in Hermes far surpasses that found in any other language that I have used, and I have found this to be a very big win. One of the reasons we can do so much at compile time is the lack of pointers. Of course, our compiler and run-time system make heavy use of pointers and shared data for reasons of efficiency, but this is completely hidden from the Hermes programmer. So now it's just a question of whether "not having pointers" and "hiding them completely from the programmer" are two different things. For all practical purposes, I'd say they are not. Hence I would disagree with your assessment (which you stated as if it were incontestable) that pointers are necessary. -- Andy Lowry, lowry@ibm.com, (914) 784-7925 IBM Research, 30 Saw Mill River Road, P.O. Box 704, Yorktown Heights, NY 10598