DeprecatedLarcenyExtensions - larcenists/larceny GitHub Wiki
== Deprecated Larceny Extensions ==
This procedure will be renamed cons* for compatibility with the R6RS.
These procedures will be renamed exists and for-all for compatibility with the R6RS.
Side effects on lists are usually a bad idea.
Property lists are nonstandard and obsolete. Use hashtables (with symbol-hash) instead.
Because these are nonstandard, the R6RS sorting procedures (list-sort, vector-sort, vector-sort!) should be used instead.
Although these procedures are perfectly safe, their semantics is slightly more implementation-dependent than their R6RS equivalents, which should be used instead.
Although Larceny's hashtables are (for the most part) better than SRFI 69 hashtables, the R6RS hashtables library is better still and should replace Larceny's hashtable procedures. The following table shows the R6RS equivalent for Larceny's oldstyle hashtables, where <searcher> is assumed to be equivalent to (lambda (x y) (assp <equiv> x y)).
Larceny's oldstyle hashtables R6RS equivalent
----------------------------- ---------------
(make-hashtable) (make-eqv-hashtable)
(make-hashtable ) (make-eqv-hashtable)
(make-hashtable ) (make-hashtable )
(make-hashtable ) (make-hashtable )
(hashtable? ) (hashtable? )
(hashtable-size ) (hashtable-size )
(hashtable-fetch ) (hashtable-ref )
(hashtable-get ) (hashtable-ref #f)
(hashtable-put! ) (hashtable-set! )
(hashtable-remove! ) (hashtable-delete! )
(hashtable-contains? ) (hashtable-contains? )
(hashtable-copy ) (hashtable-copy #t)
(hashtable-clear! ) (hashtable-clear! )
(hashtable-for-each ) (call-with-values
(hashtable-entries)
(lambda (keys values)
(vector-for-each keys values)))
(hashtable-map ) (call-with-values
(hashtable-entries)
(lambda (keys values)
(vector->list
(vector-map keys values))))
In Larceny v0.95 only, Larceny's oldstyle make-hashtable has been renamed to make-oldstyle-hashtable, and the make-hashtable procedure delegates to make-oldstyle-hashtable. After v0.95, make-hashtable will delegate to make-r6rs-hashtable, which is Larceny's name for the R6RS make-hashtable procedure. Later on, make-oldstyle-hashtable and make-r6rs-hashtable will become deprecated and will eventually disappear, leaving only R6RS-style hashtables.
These procedures implement a paradigm that breaks down in multithreaded programs.