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: Craig Burley Subject: Re: fortran error? Date: 1998/03/23 Message-ID: X-Deja-AN: 336916853 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> <3512F883.167E@still3.chem.columbia.edu> Organization: Cygnus Support Newsgroups: comp.lang.fortran,comp.unix.osf.osf1 Peter Shenkin writes: > 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. [...] > 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. [...] > 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. I was generalizing from Dick's comments to the more general idea that possible new features might not be good ideas because they'd make it hard for proprietary-software vendors to deliver upgraded versions of their products. You make good points, and, rather than discuss them, I just want to give a simple example of what I'm talking about. Suppose the Fortran standard was improved to require diagnostics if it was "obvious" that a procedure call mismatched the procedure itself in a program. That would be a decent feature, but would make it hard for existing systems, especially binary-only libraries, to be upgraded to the new standard, because the linker wouldn't (normally) be able to extract the necessary information to produce the required diagnostics. Further, even if the technical issues were easily addressed, vendors of proprietary software might complain that putting the necessary information into their binary-only distributions made those distributions too easy to reverse-engineer. My point is that these are *not* worthwhile arguments against the viability of a proposed new feature, such as this one. For one thing, the benefits far outweigh the costs. For another, it's up to the proprietary vendors to figure out a way to meet their own needs while meeting the standard -- *they*, and their customers, should have to bear the costs of distributing software so it cannot easily be reverse-engineered, copied, whatever. Users and vendors of *free* (source-available) software should *not* have to pay a greater price to do their work, just to make life easier for those who insist on using the proprietary-software approach. There simply is *nothing* to be gained, technically, from distributing or receiving proprietary, binary-only distributions. All gains you might *think* are to be so gained are either purely economic (by creating artificial scarcity, the price of software is driven up) or can be fairly trivially obtained without going the proprietary route. (For example, you seem to conclude that, if the language definition makes it hard to distribute libraries as binaries, it also makes it hard to utilize libraries as re-usable code, even if source is available. That's backwards, actually -- code re- usability is *simplified* by doing good language design *without* catering to proprietary vendors. I've been wrapping my head around the GNU model of software distribution for a few years now, and it's amazing how much, taken seriously, it solves tons of problems I'd simply taken for granted for a couple of decades of being exposed pretty much solely to the proprietary-software-must-be- catered-to model we all have built into all our software systems.) It's not that economic realities aren't to be taken into account by the *community*, because, obviously, they are -- people do, and will continue to, buy proprietary software, such as Fortran libraries they are not allowed to reverse-engineer. What I'm saying is that this sub-market should not be *catered* to by the *language-design* community (i.e. standards), especially when the result is at the expense of the larger market. That is, a new feature should not be rejected because "that'll make it hard for people to distribute proprietary versions of their run-time libraries". There are plenty of other features and behaviors language standards could (and, some do!) mandate that make distributing proprietary software quite difficult, but everything else (mostly) easier. Again, it's up to the proprietary vendors to cope, not up to us all to (continue to) shoot ourselves in the feet to make their lives easier. Of course, standards that describe how to package proprietary software in a way that meets the needs of *other* standards are another issue. E.g. if F2K proprietary vendors got together and standardized how to distribute binary-only software that still met F2K and related usability expectations, that'd be fine. -- "Practice random senselessness and act kind of beautiful." James Craig Burley, Software Craftsperson burley@gnu.org