nathan@orstcs.UUCP (12/12/83)
#R:sri-arpa:-1440200:orstcs:8500005:000:3880 orstcs!nathan Dec 11 15:49:00 1983 Consider another alternative: Borland International's Turbo Pascal. The good news: We clocked it at over 4000 lines per minute for small programs (<300 lines) slowing down to perhaps 2000/min for larger progs. This compares favorably with mainframe speeds. It has all variety of extensions (along with a bunch of new keywords) to implement the nice frills that are necessary for most real work. These include "sizeof" and all the other stuff that uses it. It has facilities for complete initialization, including selected components of structures; even variant records. Unfortunately, it's syntactically weird: you declare the initialized variables as "typed constants", although they are really just treated as variables. It fits in 28k, including a screen editor disgustingly similar to Wordstar. When a syntax error is found, it switches to the editor and puts the cursor at the offending spot. We have not found any way to make it compile the whole thing, just marking errors. It does generate *native code*, which compares reasonably with other machines (runs Sieve on a PC in 10 sec, compiles in <1 sec.) It costs only $50! The bad news: It does not support any useful variety of separate compilation. There is a primitive "external" declaration; you have to tell it the address in memory to load to. It does have "include", though, and the compiler runs fast enough that that might be ok. They decided "get" and "put" were unnecessary, along with the file variables. This makes it a real nuisance converting other programs to run on it. (but it can be done; can take hours, though) There is no "new/dispose" facility; instead, they put in UCSD ("scud") Pascal's "mark/release". It is possible to write one in terms of the other, but a nuisance. Floating point format is weird: 40 bit mantissa, 8 bit exponent. Not actually a fault, but not IEEE either. (better than 32 bit, anyway.) We haven't tried it for accuracy or speed. It supports only the "small-medium" memory model: 64k stack/heap, 64k code, 64k global data. It has a weird "recursion stack" that recursive routines copy their current data area to before using it. (this, I presume, makes non-recursive routines quicker to call; it also makes the code non-reentrant.) The limits on memory usage can be partially resolved by a facility they provide to access memory as Mem[seg:offset] with seg and offset integer expressions. The license agreement is a bit screwy: for $50, you agree not to run the compiler or any of *your* programs on anybody else's box. This includes giving the programs away. For an additional one-time fee of $100, you get unlimited use of the run-time package, and can do with your programs whatever you want. (You can, of course, give away your sources anyway) The result is that the program sellers subsidize the hobbyists, a little bit. If you can't make $100 selling your programs, find a different business. *summary* At the price, it's a superb product. There is no reason ever to use BASIC again for quick'n'dirty programs, as the compiler is so *damned* fast that for anything less than 100 lines the compile time is unnoticeable. It's also fine for writing utilities and other small-but-useful programs (write an "ls" or "dc" in it). It's not really adequate for such very large projects as "cc" or "ingres" and the like because of the lack of separate compilation facilities, and the ability to find more than one error per compile. I suspect you could use it for a long time before these became intolerable. I suggest that if you aren't maintaining something that big, it would be ideal as your primary compiler (if you can tolerate Pascal . . .); even if you need something more "industrial strength", it is easily worth buying for day-to-day needs, especially at the price. Even at $150, its better than most. (hear that, Softech?)
jph@whuxle.UUCP (12/21/83)
#R:sri-arpa:-1440200:whuxle:22700009:000:866 whuxle!jph Dec 9 18:35:00 1983 I have used the IBM PASCAL (Microsoft) for development and have found that to be very good. Some of the reasons are: - The text (code) can be as large as you want (not restricted to 64K) since all the calls between procedures are intersegment (4bytes). - The data space is restricted to a total of 64K, but PASCAL has pointers which are 20 bits so that you can access all of memory and therefore if you need it, you can create your own memory management functions for the memory that your program does not occupy, thereby using all the available memory of the system. The compiler has been reliable and there appear to be other extensions to the compiler for writing 'interrupt' routine and other 'system' routines, but this is not documented. The code that is generated (if you turn off the run-time checks on values, array bounds, etc.) is very good.