Path: utzoo!attcan!uunet!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.lang.fortran Subject: Re: Fortran versus C for numerical anal Message-ID: <1584@ficc.uu.net> Date: 23 Sep 88 14:51:10 GMT References: <1565@ficc.uu.net> <4028@lanl.gov> Organization: SCADA Lines: 45 In article <4028@lanl.gov>, jlg@lanl.gov (Jim Giles) writes: > From article <1565@ficc.uu.net>, by peter@ficc.uu.net (Peter da Silva): > > Nonesense. There is no cell containing the address of that array. It's just > > the 'C' equivalent of an assembly language label. > > YES, there _IS_ a cell containing the address of the array. It is an > immediate constant imbedded in the instructions of the code. A constant that's in lots of different places, maybe in different formats, maybe only part of a cell, not something that you can get a handle on (say, for example, if you need to expand the array by copying it to a larger version without disturbing the code). > If, as you claim, we need explicit names > for the addresses of _some_ data objects, then we should have such > names for the addresses of _all_ data objects - there's such a thing > as orthogonality. Well it would be nice. BCPL tried this. I think you would find that the overhead would be unreasonably high... there are a lot of optimisations that you would no longer be able to do. You can't do these optimisations on a dynamically allocated object without self-modifying code, so it makes sense to have a pointer. The pointer gives you all sorts of convenient features, and doesn't cost anything. Why not make it explicit? I thought, originally, that you were opposed to the idea of the dope vector in 'C'. Now you seem to have expanded this to all pointers. What, if you will pardon the pun, is the point in all this? > > You still haven't addressed the _central_ point - _NOBODY_CARES_ where > the array is located once it has been allocated! For the _vast_ majority > of the code an array is an array is an array is an.... User's have no > more need for an explicit handle on the address of a dynamic array than > they do for a static one. The _only_ difference is (and should be) > the declaration. > > J. Giles > Los Alamos -- Peter da Silva `-_-' Ferranti International Controls Corporation. "Have you hugged U your wolf today?" peter@ficc.uu.net