Path: utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!hubcap!ncrcae!ncr-sd!hp-sdd!hplabs!hpda!hpcuhb!hpcllla!hpcllld!hcmutt From: hcmutt@hpcllld.HP.COM (Harry Muttart) Newsgroups: comp.sys.amiga Subject: Re: Re: Anyone seen a good Amiga Pascal lately ? Why not Modula-2? Message-ID: <6790002@hpcllld.HP.COM> Date: 8 Mar 88 21:31:46 GMT References: <2605@crash.cts.com> Organization: HP ITG/ISD Computer Language Lab Lines: 97 / hpcllld:comp.sys.amiga / daveh@cbmvax.UUCP (Dave Haynie) / 12:23 pm Mar 7, 1988 / Dave Haynie (Thanks for Disksalv!) raises very interesting questions responding to statements made by Wade Bickel, earlier... >> + Compilation Speed. Benchmark is (as best I can compare) >> 8 times faster than MANX C. My test was compilation of >> the program "ShowILBM" under both, as this was a direct >> translation from C to M2. (I don't have Lattice). >>I'd expect the M2 compiler to be a bit faster; both BenchMark and > M2Amiga are based on Wirth's latest M2 compiler, which is a single > pass compiler. Both Amiga compilers are two pass compilers. Not > only that, though, if Benchmark is truely integrated, it'll keep a > copy of the compiler in memory, so your compile time doesn't > reflect the loading of the compiler. On a real short program like > ShowILBM, this makes a big difference. The best comparison would be > to load the Manx or Lattice C compilers into RAM, then try compiling > relatively large programs based on the same programs. You're quite right...the compiler can be made resident. It can also be unloaded (removed from memory). Having the compiler resident is very attractive after using TDI (chunk, chunk, whirrr... :^> ). > > I programmed in PASCAL for 4 years, and used WITH alot. It makes > PROGRAMMING easier, since you don't have to include all the contexts > for a reference. It makes support or translation a nightmare, since > you may have no idea, in the case WITHs nested several levels deep, > which individual structure elements belong to which structures. I > ran into this in a port of a large CAD program from Pascal to C. This is a feature which can be easily abused. Also, a compiler must make the effort to use the WITH information for more than context for locating an otherwise undefined variable or the code may be no better than fully specifying names of things. I have found that using a single level of WITH, surrounding ONLY references to the structure, means the positives outweigh the negatives. It also means that an "old man" like me can read his code three months later. >> I would like to see good comparison. Hopefully we'll see a Benchmark >> symbolic debugger by Summer? Several new "add-ons" are soon to be >> released. > > If that's true, I'd have to tell anyone interested in BenchMark to > wait until that's out before even considering it. You can't do > any serious development without a good debugger, at least a symbolic > one. If they don't support standard Amiga object module symbol > hunks (which would let you use any symbolic debugger), you'd have to > use this without a debugger, and that's death. Actually the object format used by Benchmark IS standard (according to the documentation and several reviewers). Metascope works as well with Benchmark as C, especially if you generate the symbol files (.RFM?). In addition, the package (old OXXI beta version) makes provision for adding image data to the compiled object (separate pass) so that only that hunk will need to be in chip memory. Not perfect, but much nicer than TDI (initialize phony PROCEDURE, alloc chip mem, copy PROCEDURE body to chip mem). >> In my opinion Leo, it is not so much the language as the >> implementation that makes the difference. Benchmark is the best >> piece of software I've seen for the Amiga. As far as I can tell >> there is nothing you can do in C you can't do in M2 (except assign >> a "register variable"). Use C if you wish, but Benchmark is worth >> looking into :^). > > One question on that. Can you mix assembler with Benchmark's code? > I know that M2 compilers require intelligent linkers, meaning that > they don't use standard object code, and can't likely be hooked into > code I produce with a standard assembler. If they can't be linked > with assembler, is there any support in the Benchmark package for > creating libraries and device drivers on the Amiga? Or in-line > coding of things the compiler doesn't support, like 68020 instructions? > Just curious; without these, you don't have a serious development > system. There is a tool for adding assembler hunks to your M2 object included in the package. Seems that an INTERFACE MODULE is compiled to describe the interfaces to procedures and data. There is also support for in-lining code (but only constant data, I think). This seems to cover 68010 and 68020 instructions. In a conversation with Leon, he indicated that there would be a means of initializing non-image data in official Avant Garde versions, as well (I do not know if that is what is shipping or if this is a RSN addition). All, and all, I am very hopeful regarding this version of Modula-2. While I have not gained Amiga hacker status, this product seems pretty nifty (and solid) and has met my needs, so far. Harry Muttart (just my opinions - my employer doesn't care about Ami's) ( ... hplabs!hpda!hcmutt ) -- Dave Haynie "The B2000 Guy" Commodore-Amiga "The Crew That Never Rests" {ihnp4|uunet|rutgers}!cbmvax!daveh PLINK: D-DAVE H BIX: hazy "I can't relax, 'cause I'm a Boinger!" ----------