From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 102b75,45b50f14dadfce5b X-Google-Attributes: gid102b75,public X-Google-Thread: 1164f8,45b50f14dadfce5b X-Google-Attributes: gid1164f8,public X-Google-Thread: 110292,45b50f14dadfce5b X-Google-Attributes: gid110292,public From: Craig Burley Subject: Re: Flexible Choice of Language (Nothing to do with: Final kick at the "Merced Guessing Game") Date: 1997/10/16 Message-ID: X-Deja-AN: 280920839 References: <61g30t$o2n@news-rocq.inria.fr> <343C34A7.B715A348@tonys.ecology.umn.edu> <3440F805.C98BB347@tonys.ecology.umn.edu> <61tfaa$9fr@sis.cambridge.arm.com> <3442F866.36A8BB69@tonys.ecology.umn.edu> <873em2idqg.fsf_-_@hfrd015.dsto.defence.gov.au> Organization: Cygnus Support Newsgroups: comp.sys.intel,comp.arch,comp.sys.dec Ian Dall writes: > Lastly, as you say, as person can manage only so much complexity at a > time. What you don't say is effort spent maintaining expertise in many > languages is effort not spent producing the application. Oh, but my comments applied to the *whole* job -- so, indeed, complexity includes managing the hassle of pulling chunks of code written in different languages together, not to mention maintaining the resulting mess several years out. My point is that *everything* in the project must be considered in terms of its complexity, and this can mean one's definition of "project" should be widened to include more than at first thought. (For example, it doesn't mean "set of tasks needed to get the product out the door", since that doesn't take into account the complexity of subsequent maintenance, enhancement, porting, training new hires, and so on.) So, IMO, your point is well taken. People working on *projects* shouldn't have to manage the complexity of multiple languages; but those of us involving in language *design* (and, frankly, that includes most compiler writers, or at least the "senior" ones, since it's this group that adds "extensions", for better or worse) *already* are managing the complexity of multiple languages, so it behooves us to become sufficiently expert in the science/art of language design so it becomes *less* complex to us (it certainly has to me). That is, by learning the rules that underly all artifical-language design (not yet documented to my knowledge ;-) and the patterns that are typically built out of them, we can then more easily navigate the waters of multiple languages without it being quite so complex to us. Certainly it's vastly easier for me to cope with learning new languages and systems now that I recognize the recurring patterns, themes, and so on, and I can even spot and explain mistakes much more easily now, than it was for me 20 or so years ago when language design seemed like a "black art" open to anyone who could implement a compiler. For example, the "apparent" complexity of a Mozart symphony and Stravinsky's "Le Sacre du Printemps" might seem roughly equivalent to someone unacquainted with musical theory, but if you're going to spend a lot of time coping with Mozart and his ilk, you can afford to spend the time learning the underlying rules/patterns, and suddenly the complexities of a particular Mozart symphony become a lot smaller than for the Stravinsky, which still seems complex by comparison (because it doesn't fit the models you've learned to cope with Mozart). Meanwhile, most programmers seem to *already* be coping with multiple languages, but believe that, because they use just one for one *phase* of their project (the phase that involves writing code that is compiled to produce a particular executable), they're using just one. But, if you use `make', `awk', `sed', Emacs, Perl, X, Windows, any shell, any file system, and so on, in your programming project, you already *are* coping with multiple languages, and lots of interface issues between them. Think about it: do any of the above offer constructs *similar*, but not exactly the same, as Fortran's `=', .AND., .OR., or multi-dimensional arrays? As C's `&&' or `||'? Do more than one of these offer a way to express dependencies (`make' being one)? How about selection? How about explicit signaling when a set of fields has been filled out, or "published" (hitting the RETURN/ENTER key while in a shell being an example, or clicking on OK in a windowing environment being another)? How about naming? Scoping? Wildcarding? Listing? Debugging? Automated checking for correctness? Do *many* of these things seem to recur, often with weird or different features or limitations depending on the tool? I think it's clear they do, and we spend a lot of time learning just how `make' is similar to, but slightly different than, `sh', for example. I'm *fascinated* by the possibility of sufficiently exploring all these linguistic spaces, coming up with some kind of metalanguage to clearly express, perhaps to at least document, what is really going on with lots of these, and perhaps then coming up with one, though probably two or three, simple-but-comprehensive languages to subsume all those other little languages, and yet (otherwise it'd be pointless) offer *superior* performance in addition to being simply easier for human beings to cope with (by lowering complexity). And, whenever I've put even the baby-steps of what I've learned by thinking about these issues over the past 20 or so years into actual practice, it's *always* been beneficial, though I've never done any kind of scientific study of this. (Often, others working with me have thought I might be slightly "off" in my approach, even worrying I would be late completing it, and I've ended up doing just the opposite: getting it done early, perhaps doing more in terms of features and/or quality than they thought possible using their "classic" approach. So I am looking forward to learning more about these issues, and putting more of them into practice, though I'm probably still a long way from actually designing a prototype language for writing code, which is, of course, kind of a fantasy for me.) > In short, regrettable though it may be, there are good reasons for > people to pick a reasonably flexible language and stick with it. It > is so obvious that different languages have different strengths it is > not worth debating. A more interesting discussion would be: How do you > reduce the barriers to using the most appropriate language for the job? Perhaps that question isn't strictly appropriate here, but comp.arch ends up being, frequently, a place where one "locus" of such a discussion takes place *in practice*. That is, since the way one chooses the "most appropriate language" often includes the "fit" of the languages' existing compilers to the existing machines and existing performance requirements, and since the way one chooses the "most appropriate architecture" for *future* machines (to implement a machine, or to choose an architecture for one's new project) often includes the "fit" of that architecture to existing codes written in existing languages meeting existing performance requirements, comp.arch often ends up being a place where we start by asking the eternal question "What is the One True Architecture" and thus, necessarily, ask "What is the One True Language", which then becomes "What is the One True Application", and so on and so forth. None of these elements (architecture, language, or application) really drives the industry-wide design cycle, but they *each* have too much impact on the other elements, adding more complexity than I feel will be necessary once we understand the art of managing and reducing complexity, which will happen in our field only once we can really understand how to properly engineer artifical languages (my term for Fortran, C, `make', and so on). Nowadays, there are so many languages with widely portable implementations to choose from, what we have to manage is not so much the complexity of choosing the appropriate one, but maintaining the code written in one when having to hire new people. Hence the ongoing popularity of Fortran, C, and the hype-resultant (which *is* important for success!) popularity of Java...not to mention the x86 architecture. Since it turns out the most expensive part of a typical programming project is not in the *writing* of the code, it ends up being not unreasonable that a less-than-ideal language for such writing is chosen. That's why I don't think it's productive to simply design a "clean" language for writing a certain kind, or even many kinds, of application, and expect people to just adopt it -- besides, others have attempted to do that, and pretty much failed. Personally, I think the Free Software community (e.g. Project GNU) offers a lot of potential here, which is a big reason why I'm in it. Yes, properly designing a new language is important, but making its first implementation not only solid but free, highly performing, portable, complete with debugging support, *and* with converters to/from other popular languages for that "nice, warm feeling" management often wants, all are just as important...and, it's hard to see how such an effort can be made outside the free-sw community due to the investment needed to realize it (and the fact that it's gotta be free meaning there won't be a clear ROI). -- "Practice random senselessness and act kind of beautiful." James Craig Burley, Software Craftsperson burley@gnu.ai.mit.edu