In the early 1980s, when we were working at STL in Harlow, we used two languages to build support systems for formal methods. One was Common Lisp and the other was ML, the metalanguage of the LCF proof support system. Opinion in our research group was divided; I was firmly in the Lisp camp.
I found Lisp wonderfully flexible and expressive. If you had a thought, you could map it into Lisp almost straight away. It was like a powerful, supple glove wrapping around your thinking.
Mine was, however, the minority position; most of my colleagues preferred ML. They valued the safety of its polymorphic type system and felt that defining abstract data types made you think more clearly about the system you were building (true - it was the laborious transcribing all that stuff into ML before you could get started which I couldn't abide).
Suppose, for example, you wanted to write a program that worked on a tree of lists. The preferred approach in our group would be to define a polymorphic tree type, then use lists as the element type when you constructed a particular tree. You would also define the operations you needed on trees, including tree-equality if you wanted to compare two of them. You could spend most of the morning setting up this little abstract data type algebra before you got to the bit of code you needed to write.
In Lisp you just got going. If you really wanted to make manifest your abstract data types, you could write a few functions to keep things tidy (constructors, destructors and discriminators). Some did little more than give familiar Lisp operations names that made sense for the problem at hand - 'hd' and 'tl' for 'car' and 'cdr' for example. You might have given up ML’s automatic (and almost magical) compile-time type checking, but you might have solved the problem by the time the other guys had finished their type definitions.
I think there was a question of temperament here. In the old left-brain, right-brain vocabulary, Lisp felt right-brained to me, intuitive and fluid. ML felt left-brained, linguistic, structured and organised, almost intellectually coercive.
Compared with the subtlety and smoothness of Lisp.

No comments:
Post a Comment
Comments are moderated. Keep it polite and no gratuitous links to your business website - we're not a billboard here.