Path: utzoo!mnetor!uunet!cbmvax!daveh From: daveh@cbmvax.UUCP (Dave Haynie) Newsgroups: comp.sys.amiga Subject: Re: Anyone seen a good Amiga Pascal lately ? Why not Modula-2? Message-ID: <3429@cbmvax.UUCP> Date: 7 Mar 88 20:23:24 GMT References: <2605@crash.cts.com> Organization: Commodore Technology, West Chester, PA Lines: 149 in article <2605@crash.cts.com>, haitex@pnet01.cts.com (Wade Bickel) says: > I use Benchmark Modula-2. It has advantages and disadvantages > over C. Listing the assets/liabilities of each > C: ... > + Symbolic Debugger exists (MANX). Well, yes, but more than that. Manx ships with a symbolic debugger and now offers a very nice Source Level debugger as an option. Lattice doesn't include a symbolic debugger yet, but since they use the standard Amiga object format, any standard Amiga symbolic debugger (like MetaScope) will work just fine with Lattice. More + Manx C allows in-line assembly code + Manx C can produce native 68020 code and in-line 68881 code. > - C compilers are buggy. C compilers WERE much buggier than they are now. Not only that, but both Manx and Lattice offer BBSs that you can call. Lattice is also on BIX. I'm using both Manx 3.6 and Lattice 4.0 now, haven't run into any bugs myself yet. > There are hundreds of Benchmark user's, ever seen a > Benchmark bug report? No. Then again, I don't find this surprising, considering the relative number and level (eg most commerical developers use C) of C users over Modula2 > M2: (Benchmark) > > + Integrated Development Environment. This makes using > Benchmark extremely easy. From the editor (modified > gnu-EMACs) ^^^^ Smile when you say that. It's MG, not Gnu. A real GNU emacs wouldn't need modification, you could write all those extensions in M-LISP. Between running a background Emacs and using MAKE, I find little need for an integrated enviromnent. Certainly integrated environements are useful on single-tasking machines, but I'd rather build my own. For instance, what if I prefer a VI or EDT clone, or a better version of MG, over the BenchMark MG? > + 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. > + Excellent Documentation. Benchmark was implemented > entirely by Leon Frenkel. Not true, this one, as M2Amiga, came from the Wirth compiler. But whether it's a port or not is meaningless, as long as the person porting it did a proper job of Amigaizing it. > + M2 includes a statement called "WITH" which supports > record (structure) access. As far as I can tell > no equivalent to this statement exists in C (as avail- > able on the Amiga). This statement leads to both > more readable (in terms of context) source, and more > efficeint code. 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. > + No Bugs. In the last 6 months Benchmark has never > Guru'd on me. As far as I (or anyone I've spoken > with) can tell, this seems to be true. I've never had either compiler crash on me. No reason one should, a compiler is a pretty mild program in terms of what it does to the system. As for the output of that program crashing, there's always a tradeoff between the speed of your program and the errors you'd like the run-time environment to catch for you. This is compiler independent. > + Strong Types. M2 uses strong type checking. This makes > the language easier to learn and debug. Lattice has type checking as an option just about as good as any Modula2. Only it doesn't force it's ideas on you; type violations show up as warnings, not errors. I usually know from the warning if a real problem exists or not. > + Readablility. M2 is much more readable than C. This > is of value to the novices and group efforts. For novices, perhaps. M2 is also quite a bit less writable than C; it's very verbose. > Benchmark seems to put out code that is at least as good as Manx-C. Size-wise, maybe. If it's a typically M2 compiler, though, it'll put lots of bounds checking code in the run-time environment. So I'd expect it to execute slower than a C compiler that otherwise produces similar quality code. > 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. > 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. -- 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!"