From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,1ef3b84ca62fad7b X-Google-Attributes: gidfee84,public X-Google-Thread: 1094ba,1ef3b84ca62fad7b X-Google-Attributes: gid1094ba,public From: Peter Shenkin Subject: Re: fortran error? Date: 1998/03/20 Message-ID: <3512F883.167E@still3.chem.columbia.edu>#1/1 X-Deja-AN: 336095533 Content-Transfer-Encoding: 7bit References: <3507A4A5.F8A7DDC2@matd.tu-graz.ac.at> <6ejfii$kbd@usenet.pa.dec.com> <350E95A7.41C6@still3.chem.columbia.edu> <350EDA13.2781@still3.chem.columbia.edu> <351181DB.2781@still3.chem.columbia.edu> <6etspg$iov@bgtnsc02.worldnet.att.net> Content-Type: text/plain; charset=us-ascii Organization: MacroModel Development Group, Columbia University Mime-Version: 1.0 Newsgroups: comp.lang.fortran,comp.unix.osf.osf1 Craig Burley wrote: > > Dick Hendrickson writes: > > > This doesn't mean compilers shouldn't do it, only that there is a > > real cost. Inlining helps, but some library code is only available > > in binary form. > > That's a point in favor of short-term practicality, but I'd > like to point out that restricting language and tool design to > allow library code to be distributed only in binary form > (i.e. proprietary and made hard to reverse engineer), especially > to *existing* such libraries, *severely* restricts the power of > those languages and tools. I've reread Dick's and Craig's comments a few times, and I'm not sure I understand Craig's harangue in this context. I think Dick was using as an example ("Inlining helps....") the fact that, if you have a library only in binary form, you can't insert INLINE directives; therefore, if a library is slow because of failure of the writer to INLINE, the user cannot recompile it after making changes unless he has source. This in no way constitutes a "[restriction] of language and tool design to allow library code to be distributed only in binary form." There's nothing about the INLINE feature that especially facilitates or restricts binary distribution. It's just a case in which someone with access to the source code, motivation for improving that code and time to spend on the project might be able to produce faster code. Changing an underlying algorithm is another such way such a person could do this. It has nothing to do with restricting language features, as far as I can see. But I also take exception to Craig's overall point of view on this. I think that if the language definition makes it hard to distribute libraries as binaries, this also makes it hard to utilize libraries as re-usable code, even if you do have the source. In other words, if I have source for a library, and if I can compile and readily use the binaries for many programs on my system, then there is no reason the binary can't be used without source by other people. On the other hand, if I cannot compile the library code and readily use the binary libraries for many programs after compilation, then I have lost a major benefit of libraries in the first place: code reusability. I feel that the failure of F90 to mandate a mechanism for the USE facility makes re-use of libraries difficult; even portable Makefiles become difficult or impossible. I reiterate that this is a real drag even if one does have source. Further, any language that fails to make it easy to use a binary-only distribution is making most users do lots of work they shouldn't have to do. For instance, if I needed to do something to the source of the C stdlib or stdio functions (or even have it on my system) every time I wanted to write a program using malloc() or printf(), I would certainly never write code in C. The whole purpose of writing libraries is so that users don't *have* to know anything about the source, or even about the language the libraries are written in. Any language that requires the user of a library to know something about the source language (other than the API) is failing in its fundamental task: to allow the user to utilize a computational facility without understanding all the gory details of how it works. > For example, I've observed (somewhat casually ;-) the long-term > efforts, and problems, incurred trying to put decent exception > handling into gcc, and it seems that most of the actual problems, > and thus effort resolving them, revolves around catering to > already-compiled binary code, where source is inconvenient or > unavailable. This sounds like a back-compatibility problem with existing code which was developed before the new features were designed. It doesn't sound like a problem that would affect even proprietary code developed with the new features in mind. > I think it's not worth catering to these needs at all, or at a > very low priority, in new-language design, Ah, but C is an old language, and gcc an old dialect, by now. > ... and leave it to the > vendors of proprietary libraries and relevant tools to improve > *their* products to meet *their* requirements as well as the > (new) ones of the language environment. (But I'm afraid too > many of them would prefer the language be crippled for non- > proprietary users to make their proprietary tools easier to build.) I don't doubt that writers of proprietary code would be against features that prevent them from keeping their code proprietary, but I do have trouble imagining what such language features would look like, and I also have trouble imagining useful language improvements that would have this effect. -P. -- ************** In memoriam, Grandpa Jones, 1913-1998, R.I.P. ************** * Peter S. Shenkin; Chemistry, Columbia U.; 3000 Broadway, Mail Code 3153 * ** NY, NY 10027; shenkin@columbia.edu; (212)854-5143; FAX: 678-9039 *** *MacroModel WWW page: http://www.columbia.edu/cu/chemistry/mmod/mmod.html *