CS234319 / safot

5 stars 65 forks source link

Differences between MINI-LISP and COMMON LISP #462

Open yossigil opened 2 years ago

yossigil commented 2 years ago

This issue is to summarise the differences between the two. it should be added to the book as a chapter.

  1. CAR/CDR of NIL fail in ML,returns NIL in CL.
  2. NLAMBDA and NDEFUN are not present in CL. They are done with macros. Consider changing these to “defun’” and “lambda’”
  3. ML uses square brackets for dotted pairs.
  4. ML uses one a-list for functions and variables. CL uses only one.
  5. CL supports integers, arithmetic, strings, etc. In contrast, ML allows any punctuation character in an atom, and all atoms are symbolic. There are no integers.
  6. Very few library functions exist in ML. Said differently, many common CL function such as setq and caar are not part of ML. For example, (NDEFUN setq (a b) (set a (eval b))) or (defun caar (x) (car (car x)).
yossigil commented 2 years ago

@DorYeheskel @gur111 @m-barsky @twyair @orel-adivi @OfirMarkowitz1 can you please see if I forgot something?

DorYeheskel commented 2 years ago

@yossigil

  1. Built-in functions in CL (e.g: setq, shiftf, ...), which does not appear in ML.
  2. Shortcuts to car/cdr in CL (e.g: CAAR, CADR, CDAR, CDDR, CAAAR, CAADR), which does not appear in ML.
yossigil commented 2 years ago

THANKS. Fixed.