Audited and updated for clarity or to point to more examples
authorMatthew Mondor <mmondor@pulsar-zone.net>
Tue, 13 May 2014 20:11:29 +0000 (20:11 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Tue, 13 May 2014 20:11:29 +0000 (20:11 +0000)
mmsoftware/cl/test/advantages-of-common-lisp.txt

index 12644a7..27f1e43 100644 (file)
@@ -1,4 +1,4 @@
-$Id: advantages-of-common-lisp.txt,v 1.7 2014/01/15 04:08:34 mmondor Exp $
+$Id: advantages-of-common-lisp.txt,v 1.8 2014/05/13 20:11:29 mmondor Exp $
 
 Various advantages of Common Lisp which I could easily think of are listed
 below.
@@ -106,17 +106,20 @@ FEATURES
     macros despite possible interruption by signals
 - Macros
   - Lexically scoped or global (MACROLET, DEFMACRO)
-  - Also support for symbol macros, where instances of a symbol are expanded,
-    other than only function macros
+  - Also support for lexically scoped or global symbol macros, where instances
+    of a symbol are expanded, other than only function macros
+    (SYMBOL-MACROLET, DEFINE-SYMBOL-MACRO)
   - Common Lisp macros are unlike C-style macros and are very powerful, can
     avoid side effects and expand to arbitrary, complex code.  They are
-    written in powerful Common Lisp and can use custom functions
+    written in powerful Common Lisp and can use custom functions.
   - Useful in the development of domain-specific-languages (DSLs), WITH-*
     macros, syntactic sugar for slot accessors, DEFINE-* and DO-* macros,
     optimization, custom iterators, development of new special forms and
-    object systems, etc
-  - Can be passed an environment object
-  - Can access a function's body as necessary, not only its arguments
+    object systems, etc.  It is common for WITH-* style macros to protect
+    finalization code in an UNWIND-PROTECT form, such as ensuring to close a
+    file in WITH-OPEN-FILE.
+  - Can be passed an environment object for custom lexical environments
+  - Can access a function's body as necessary, not only its arguments (&WHOLE)
 - Compiler macros, similar to macros but for use as hint to the compiler to
   transform code, usually for optimizations.  Can access the whole body of a
   function and substitute it.  Can also access all arguments of the function.
@@ -137,14 +140,16 @@ FEATURES
   of symbols for identity using EQ is very efficient.  Symbols may be in
   namespaces called packages.  Custom systems may also implement their own
   namespaces.
-- The SETF macro, allowing custom accessors and operations
+- The SETF macro, allowing custom special accessors and generic operations,
+  including standard-provided rotation using ROTATEF and shifting using SHIFTF
 - New classes, structures and types (and related predicates and constraints)
   easy to define and use
 - Functions may return multiple values, and multiple values may be bound to
   variables or accumulated in a list (VALUES, MULTIPLE-VALUE-BIND, etc)
 - Functions with very flexible arguments, such as optional arguments with
-  defaults, named arguments, fixed arguments, ability to catch all arbitrary
-  arguments in a list, etc
+  defaults, named arguments with defaults, fixed arguments, ability to catch
+  all arbitrary arguments in a list, determine if an argument was supplied
+  instead of using the default, etc
 - Complex list destructuring/parsing i.e. as part of LOOP (like list
   comprehensions) or explicit using DESTRUCTURING-BIND
 - Code is manipulable data
@@ -154,6 +159,7 @@ FEATURES
   code as well as better performance.
 - Mature and efficient compilers exist
 - Reader available at runtime
+- Dynamic code evaluation at runtime using EVAL
 - Compiler available at runtime to compile files or functions, may be used to
   implement custom compilers using Common Lisp as an intermediate
   representation.  On some implementations, there may be more than one
@@ -161,9 +167,10 @@ FEATURES
   code (.i.e. via C, other methods or directly).  Interactive commands may
   implicitelly be compiled or interpreted, depending on implementation.
 - Files may be reloaded, with wanted image state maintained rather than
-  reinitialized, i.e. by using DEFVAR
+  reinitialized, i.e. by using DEFVAR, and updating existing CLOS object
+  instances.
 - Very flexible language including special low-level forms such as PROGN,
-  PROG1, PROGV, TAGBODY, BLOCK, etc
+  PROG1, PROGV, TAGBODY or TRY/CATCH for jumps, BLOCK, etc
 - Designators, system and user-defined ones (a designator argument may accept
   multiple types which can logically represent the wanted object.  For
   instance, a symbol may serve as a function designator, which FUNCALL/APPLY