Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!csd4.milw.wisc.edu!uxc!uxc.cso.uiuc.edu!gistdev!flint From: flint@gistdev.UUCP Newsgroups: comp.lang.c++ Subject: Re: extern "language" (was: C --> C++) Message-ID: <7900001@gistdev> Date: 5 Jun 89 21:00:00 GMT References: <2858@pegasus.ATT.COM> Lines: 59 Nf-ID: #R:pegasus.ATT.COM:2858:gistdev:7900001:000:3466 Nf-From: gistdev.UUCP!flint Jun 5 16:00:00 1989 The goal of consistency is to make it so that you know what to do in a particular case without having to spend time looking it up: you just learn the rule and thereafter you know what to type. The consistency being argued for here isn't consistent: (or at least it isn't consistent with the goal above :-) ) If you adopted Walter's idea that the case matters, but that the first letter of the language name should be capital and the rest of them not, THEN it would be consistent, and I would always know what to type when it came time to type in an extern "Fortran". However, that level of consistency has been "voted down" (too bad, IMHO). An approach that then says "the case in the language name matters, but we won't define any consistent rule on what case to use when" is completely inconsistent. I believe we can safely state that you aren't ever going to want to have: extern "Pascal" and extern "pascal" mean that you want to do something different in the two cases. God help us all if someone starts doing something like the above, so that "FORTRAN" refers to FORTRAN-77 linking while "Fortran" refers to newer versions because the language document changed: talk about priest-class rules. If the two versions above will never never ever mean different things, then the only possible reason for not recognizing them as the same construct is because you like to waste people's time with extra unnecssary compiles even though you knew exactly what the programmer wanted you to do. It appears to me that the ONLY way you can get back to a state where you do have "some" consistency is to say that you will consistently ignore the case in an extern. If that isn't consistent enough for you, argue for Walter's proposal, which is the only one we've seen yet that really is consistent. > nevin1@ihlpb.ATT.COM writes: >There are times when it is worth giving up consistency; however, this >isn't one of them. In reality, what percentage of total code will >contain the extern "language" construct? Very, very little. How many >languages do you plan to incorporate in any given program? You're wrong there, I believe. The programs of today are often built by reinventing the wheel whenever you need a new one: quite clearly, you don't start a new program very often intending to write it in 3 different languages. But more and more, what I'm seeing as a trend for tomorrow is increased inter-language linking, because you have thing X written in one language and thing Y in another, and you have to put them together now to move on: the existing applications are too big and have too much invested in them to start over just because you don't like the language they are in. (For example, there are large complex libraries of statistical analysis tools around in FORTRAN (or was that Fortran?) that people get stuck calling from C because they want to use user interface libraries written in C (for X), and they may have a relational database library accessible only with Pascal calls. The trend toward "everybody builds their applications on top of a set of software libraries they didn't write" instead of "everybody develops the entire thing from scratch" is going to force the need for more and more inter-language contact. Flint Pellett, Global Information Systems Technology, Inc. 1800 Woodfield Drive, Savoy, IL 61874 (217) 352-1165 INTERNET: flint%gistdev@uxc.cso.uiuc.edu UUCP: {uunet,pur-ee,convex}!uiucuxc!gistdev!flint