4 ms·
> antiquated LISP That's debatable. True, Lisp is Old. Hardly antiquated.
by reddit_clone 9y ago
> antiquated LISP
That's debatable. True, Lisp is Old. Hardly antiquated.
- HelloNurse 9y agoI agree, but over the decades LISP developed significant complications, such as object oriented features; I think the most appropriate LISP for an introductory FP course would be a very antiquated and very simple and pure one, without advanced features (and the accompanying syntactic pollution) that might be of interest as advanced theory, useful in advanced practice, but a source of confusion and a major waste of time for beginners. Fancy LISP variants would still be vastly easier to learn than Haskell, but a straightforward computer adaptation of lambda calculus would minimize the distance between theory and running programs. I'm not familiar enough with Scheme or Clojure to tell whether they are too complex for an introductory course.
- flavio81 9y ago>I agree, but over the decades LISP developed significant complications, such as object oriented features How can this be a complication? On Common Lisp, you can just choose not to use object oriented features (the CLOS system). There are many CL libraries that do not use OOP code at all. And if you want to use them, in CLOS a method is called exactly the same as a function; they are called "generic functions", so the syntax is just the same. >without advanced features (and the accompanying syntactic pollution) I don't think there is any syntactic pollution. Again, in Common Lisp the syntax is totally uniform for all the features, in fact for a beginners' Functional Programming course, he/she would only need to learn: () parentheses for opening and closing an s-expression ; for comments ' for quoting an s-expression so it is not evaluated #' for indicating that the following symbol is a function name (not needed on Lisp-1 languages like Scheme) "" for delimiting a string ... and that's it!! "Advanced" features don't introduce too much syntax either: ` for quoting an s-expression in a "template" way (i.e. for use in macros) , for escaping the ` operator ,@ for escaping the ` operator, "splicing" the contents of a list; for example when passing a code block to a macro. For a language that is really extensive in features, the amount of syntax introduced is minimal, really. Compare with Haskell.
- HelloNurse 9y agoOf eight special delimiter character you list, three are used for macros. While the syntax of the highly evolved Common Lisp you have in mind remains extremely frugal, macros are only one of many relatively large unnecessary luxury feature. Teaching fancy language features in an introductory course steals time and attention from fundamental functional programming principles. CLOS, unless thoroughly dissected as an advanced example of how far can you go with LISP, would be an even worse gratuitous distraction than macros. Of course, "complex" LISP isn't going to be comparable with Haskell, and in a sufficiently long introductory course advanced language features might be worth teaching to increase student productivity.
- lispm 9y ago> I'm not familiar enough with Scheme or Clojure to tell whether they are too complex for an introductory course. Simple Scheme has been used for decades for introductory courses, both in schools and university. An even simpler Lisp called Logo has been used with early programming education for kids. Lots of educational material based on Scheme or Logo exists.