From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 10 Sep 92 14:10:56 GMT From: prism!jm59@gatech.edu (MILLS,JOHN M.) Subject: Re: Compiler in its own language (Was: Re: Play 20K expressions again, Sam) Message-ID: <67946@hydra.gatech.EDU> List-Id: In article <199209100637.AA13126@cnam.cnam.fr> bortz@CNAM.CNAM.FR writes: >... [ lead-up discussion deleted ] >IMHO, it is better to write the compiler in the language it compiles, >whatever is this language. >It has several technical benefits: (1) >- any improvment in the optimizer will optimize the compiler as well, (2) >- this is the greatest test suite you can dream of: if it can compile >an Ada compiler, it will compile everything :-) >and a commercial one: (3) >- it states clearly that you trust the language you try to sell. Without having come _close_ to writing a compiler or interpreter, I have some very serious reservations about this reasoning. Programming languages have various ranges of application, strengths and weaknesses, and tradeoffs of power vs. mastery for effective use. I couldn't select only one language to do all types of programming and feel I had always the best tool. (Naturally, I think the USDoD's attempt to do this with Ada forces some poor and expensive design decisions, some of which were on my projects. .. Sorry, no details.) C was originally developed to write operating systems, and its relative simplicity, implementation on processors from 8080s to Crays (and targeting for an even _broader_ range), led to its use for a lot of programming, development of C++ and a wide range of programming support tools, etc. Just because one needs (for example) a better FORTRAN compiler doesn't imply the compiler should be written in FORTRAN. Some BASIC interpreters were written in [compiled] BASIC, but they were generally not the good ones. For all I know, Ada may _be_ the best language to write a compiler; in that case it should be considered for Pascal compilers, etc. My plaint is with the assumption that a single language has the qualities for any and all applications. I have seen OOP (in C++) used to provide special operations and data types needed in DSP programming, allowing DSP code to be written in "near C." Perhaps OOP will evolve some tool sets with [largely] common user and programmer interfaces for _whatever_ language is best for the rest of the program. That would help both camps, and is probably happening with windows bindings, as we type. >I tried to list the languages used by some compilers. (If someone wants >to complete/correct this list?) > >Compiler Language > >Verdix C + now partly in Ada >Telesoft Ada >Alsys Ada >DEC Bliss + Ada (unknown proportions) >Meridian ? >Ada-Ed, first version SETL >Ada-Ed, second version C >Systeam ? >GNU Ada C, but may be an Ada version (?) > Several surveys have compared these various compilers, and I don't recall any correspondence between user satisfaction and compiler source language. Many users (including our team) report satisfaction with the DEC product, in our case partly because of its close correspondence to the XDAda for our MC680XX targets. We also use the RTAda version of the Telesoft product, and found our development process much more painful using that package. Depending on your benchmarks, an otherwise excellent compiler may be unacceptable: if you _need_ 100 microsec. interrupts and the package only turns around in 250, you're stuck! One size _doesn't_ fit all, even in the same programming language. Regards --jmm-- -- John M. Mills, SRE; Georgia Tech/GTRI/TSDL, Atlanta, GA 30332 uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!jm59 Internet: jm59@prism.gatech.edu "f U cn rd dis, U mst uz Unix!!!" ...jaw