Chandra Bajpai wrote:
I'm curious why Larry Tesler and his team from
Xerox Parc picked Pascal as
the language to build Lisa on...esp. considering the Alto was a BCPL machine
(forerunner of C).
I know Apple was an early adopter of USCD Pascal...I wonder if had any
influences.
Did Apple write their own compiler?
Yes, actually. I think they had a Pascal compiler in the Apple II or
III days even.
There is nothing inherently wrong with Pascal as a language.
Personally, I'd much rather type in { and } than begin and end
everywhere, so perhaps the syntactic sugar of other languages was more
appealing. The enforced typing and range checking can be a bit
annoying, but they do keep your code clean and expose bugs early on - so
they are helpful. I suppose you could think of them as training wheels,
hence "teaching language."
There is one thing that Pascal does better which is strings. Zero
terminated strings are problematic in many ways. i.e. buffer overflows,
strlen() and strcat have to read in the entire string, so are much
slower. PStrings are a lot better, at least when you can choose the
width of length integer. (For the original versions, a single byte is a
bit limiting.)
I think a lot of the issues people have with it was originally aimed at
the P-Code versions which, of course was painfully slow. Also lot of
the early compilers were poor at optimizing code, and this applies to
most compilers as those were the early days. (There was no JIT back then.)
I never actually used the Lisa's Pascal compiler to do anything useful,
but the LisaWorkshop was not a GUI environment. It was a text based
menu system where you invoked the editor (which was a GUI program), the
compiler, and other tools separately through a set of text menus.
If you were to compare it with, say, Borland's Turbo Pascal, which
arrived much further on down the road, it was probably not as fast a
compiler, and probably didn't produce code that was as fast.
Now Lisa did have an OOP version of Pascal called Clascal. I'm not sure
how much of the OS is written in straight Pascal and how much in
Clascal, but they did manage to originally miss taking SmallTalk from
Xerox. :-)
You can find LisaWorkshop here:
http://www.macmothership.com/lisacontent/app_lisa.html
Lisa 1 :-)
Wow! You're very lucky!
91 Lotus Esprit
In more ways than one!