- Changes to ANSI that are technically extensions, but address long-absent functionality which makes it difficult to portably do simple things.
- Extensions that cannot be reasonably implemented as libraries. (Note: this makes FFI technically in scope, but unless a high-quality spec materializes there's no need to mention it...)
- Extensions that can be implemented as libraries, but are very much standard folklore, like with-gensyms.
CDR is one process for publishing proposed extensions.
For user-space extensions, go and write a Library.
- Gray streams user-extensible streams
- simple-streams from Franz, which avoid some problems in Gray streams
- User-extensible sequences. See Christophe Rhodes' presentation from ILC 2007: http://www.doc.gold.ac.uk/~mas01cr/talks/2007-04-03%20Cambridge/ilc-talk.pdf.
From the paper, it seems like the protocol relies on CLOS in a way that makes this impossible to support structures in addition to classes. Which, for example, prevents SERIES in its present form from being upgraded to a user-defined sequence. Even though anything implemented as a structure can be ported to CLOS, I believe it's worth pointing out, since structures can be expected to be more efficient in general. — akater
- Case-sensitive symbols. ACL and CLISP both have extensions to provide this (see http://www.franz.com/support/documentation/8.2/doc/case.htm and http://clisp.cons.org/impnotes/package-case.html)
- Add conformal displacement (array slices) for multidimensional arrays. The other side of the argument is to get rid of displaced arrays altogether, since they are rarely used and prevent certain optimizations. --Vladimir Sedach
- Extend :(CLHS ARRAY), :(CLHS VECTOR), :(CLHS STRING), and related type specifiers so that other array attributes can be specified (that the object is/is not displaced, adjustable, or (for vectors) it does/does not have a fill pointer.)
- Add weak-key hashtables for example by standardizing on the extensions of Franz or Lispworks. trivial-garbage is a library that attempts to provide a portable interface to various implementations' weak hashtables. Weak-value hashtables and weak references should also be included. Finalizers are a very important feature. The extension should specify whether the finalizer can have access to the about-to-be-collected object to be able to "resurrect" it (currently some GCs run finalizers post-collection; the pros and cons of either approach should be examined). See Bruno Haible's writeup on weak references which examines the issues and state of various implementations as of 2005.
- Have a way to weakly intern symbols in a package. The effect is that if nothing else refers to the symbol, the symbol can be gc-ed and removed from the package. Alternatively, allow gc of every unreferenced truly worthless symbol (that is, one on which BOUNDP, FBOUNDP, and SYMBOL-PLIST all return NIL) --John Cowan
- Make WITH-GENSYMS or WITH-UNIQUE-NAMES macro part of the standard, since it is very widely re-implemented in libraries.
- Specify, for lisps purporting to conform to :IEEE-FLOATING-POINT, the mechanism for enabling traps and clearing accrued exceptions, and for setting the rounding mode (and precision, where applicable), and how this interacts with standard CL functions such as FFLOOR and FCEILING.
- Improve the support for floating-point and complex arithmetic as outlined in section C.9 of the draft version of ISO/IEC 10967-2 and section C.7 of the draft version of ISO/IEC CD 10967-3. (There may be other standards from ISO/IEC JTC1/SC22/WG11 that could be made normative.)
- Add an ARGLIST function that, given a function designator, returns the argument list of the function. Suggested alternative name: FUNCTION-LAMBDA-LIST.
- Define a way for macros to wrap a :(CLHS LOOP) around the body without affecting :(CLHS LOOP-FINISH) forms within it. This could be done by defining a new :(CLHS LOOP) keyword FINISH-NAME. Then, (loop ... do (loop finish-name foo ... do (loop-finish))) would finish the outer loop directly. To finish just the inner loop, you'd have to use (loop-finish foo). Macros would use gensyms. Other possible syntaxes include (loop using (loop-finish foo) ...), which puns on for-as-hash; (loop unfinishable ...), which would be entirely invisible to LOOP-FINISH; and (loop fully named foo ...), which would require both (:(CLHS return-from) foo ...) and (loop-finish foo). Would extending :(CLHS LOOP-FINISH) to take the loop name as an argument be sufficient (exit from the innermost loop with the given name)? --Nikodemus Not quite. Users of macros would often omit the argument of :(CLHS LOOP-FINISH), for the sake of clarity or compatibility with current CL. Implementors of macros would not be able to handle such cases transparently. If :(CLHS LOOP) is extended too, then only macro implementors need be careful, like they already are with names of variables; users can ignore the whole issue. -Kalle Olavi Niemitalo I don't understand the need for this. However, :(CLHS LOOP) already has a NAMED clause that could be used for :(CLHS LOOP-FINISH). It would overload its meaning, but it would reduce the number of changes needed. - Marco Antoniotti>
(backquote ...) standard macro (like Scheme quasiquote) to allow for easier and scheme-like programmatic use of ` in constructs. I forget any arguments as to why it standardising it would not be good idea, but no doubt there are some. Constraining implementations seems unlikely as far as I can see. Morality-police discouraging its use, maybe, but I don't like that.
If the semantics are going to match Scheme, then the name should too. Also, one cannot implement extensions such as `#C(,x ,y) if the ` reader macro is required to just read a form and put (backquote ...) around it. -Kalle Olavi Niemitalo
Is that really so? I would think that changing #C to translate #C(,x ,y) to (unquote (complex x y)) would do the trick. -Dirk Gerrits
This is a really, really bad idea; totally contrary to the meaning of backquote. Backquoted material should be handled by the reader (as in most CL implementations now). Turning it into a form is so bad, I'd seriously consider abandoning Lisp if it happened, I feel so strongly about that. -- AC
No, it's a good idea. While most of the times it doesn't matter whether backquote is handled in the reader or not, there are times when it'd be really nice to know what the sexpression representation of '`(foo ,bar) is. Currently it's implementation defined which means that macro-writing macros can't take backquoted templates as input which they can then frob. A specific example: recently I was writing a mini-language and wanted to write two functions, one that compiled my intermediate representation for use in a macro and another that interpreted it. The compiler and interpreter were essentially identical except one generated code while the other executed it. If backquote templates were read into a specified sexpression form then I could have written a macro that took a list of backquoted templates and generated both functions. Instead I had to essentially implement my own backquote syntax that I could then take apart and put back together. -- Peter Seibel
I don't claim to have thought this through, but requiring tighter binding of backquote/comma to the reader might let constructions such as #C`(,a ,b) fall out without extra per-read-macro specifications. --nikodemus
Extend :(CLHS MAKE-HASH-TABLE) to take any function as an equality predicate, and open it up so users can write their own hash functions. These will put CLOS objects on an equal footing with built-in objects.
I'd rather see (DEFINE-HASH-TABLE-TEST test-function-name hash-function-designator), and making :(CLHS MAKE-HASH-TABLE) accept any defined test in addition to #'eq.*. This way libraries can provide new hash-table types, and users of those libraries don't need to muck about with extra arguments to M-H-T. --Nikodemus --Why not test-function-designator, then? --John Cowan
I like DEFINE-HASH-TABLE-TES too. --sds
Extend the guaranteed behavior of :(CLHS SUBTYPEP), so that it must succeed in determining subtype relationships in more situations. In particular:
- If :(CLHS SUBTYPEP) can determine that A is (or is not) a subtype of B, then it should determine that (NOT B) is (is not) a subtype of (NOT A).
- (NOT (NOT A)) should have the same behavior as A.
- If :(CLHS SUBTYPEP) can determine that A is a subtype of B, and A is a subtype of C, then it should be able to determine that A is a subtype of (AND B C).
- If :(CLHS SUBTYPEP) can determine that A is a subtype of C, and B is a subtype of C, then it should be able to determine that (OR A B) is a subtype of C. Better yet, require SUBTYPEP to succeed in all situations except those involving SATISFIES (which are undecidable), per Henry Baker's decision algorithm. --John Cowan