3 ms·
>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 c
by 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.