Path: utzoo!attcan!uunet!know!sdd.hp.com!wuarchive!udel!cis.udel.edu From: carroll@cis.udel.edu (Mark Carroll) Newsgroups: comp.lang.misc Subject: Re: C's sins of commission Message-ID: <33379@nigel.ee.udel.edu> Date: 13 Oct 90 20:39:39 GMT References: <2627@l.cc.purdue.edu> <1990Oct10.193502.2011@d.cs.okstate.edu> <2632@l.cc.purdue.edu> Sender: usenet@ee.udel.edu Organization: University of Delaware Lines: 59 Nntp-Posting-Host: apollo.cis.udel.edu In article <2632@l.cc.purdue.edu> cik@l.cc.purdue.edu (Herman Rubin) writes: >In article <1990Oct10.193502.2011@d.cs.okstate.edu>, norman@d.cs.okstate.edu (Norman Graham) writes: ]] From article <2627@l.cc.purdue.edu>, by cik@l.cc.purdue.edu (Herman Rubin): ]]] 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. ] ] ....................... ] ]] Pointers are not the only way of providing these kinds of operations-- ]] they're not even the most beautiful (conceptually speakin, of course). ]] The ability to pass functions to function and to store functions in ]] data structures only requires that functions be first class values in ]] the language: Pointers to functions are unneeded if functions are ]] values in the language. You just need to match the tool to the ]] problem. If you require pointers, use a languages with pointers; ]] otherwise use a conceptually more simple language~r{_ {_. ] ]There are real simplifications and apparent simplifications. ] ]Suppose that internally information is being passed in a computer. Now ]the only ways that I can see to pass this information is to pass all or ]part of the value, the name, or a pointer. By part, one can pass part of ]the value and a way to get at the rest, so that the problem is repeated, ]although there are many places where this is done; many string procedures ]pass part of the string and pointers to what is before or after. ] ]Now passing the value may be the best way to do things, or passing a pointer. ]Passing the name only rarely; interpreters are slow, and compilers and linkers ]normally replace names with values or pointers, even for first-class objects. Herman, you should really strongly consider learning a little bit about languages, because you're continually making a fool of yourself out of ingorance. *** Machine Level Representation != Language Level Representation *** That's the ENTIRE POINT of high-level languages - to allow us to write programs in representations that are different from that of the underlying architecture. The "real" way in which things are represented is not necessarily the best way to present them to a human being. Of COURSE you'll have pointers on the execution level, if you want to represent data structures - there's really no way to avoid that. But, equally, you've got to have bitstrings on the execution level to represent floating point numbers. Do I want my progamming language to force me to twiddle bit strings? No - and equally, I don't necessarily want my programming language to force me to twiddle pointers. There are better ways to represent things on my level. Like Recursive data structures. Or perhaps the table types that the hermes people have spoken about. ]Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907