4 ms·
Scheme renamed them? When did that happen? R5RS? R6RS? R7RS? IEEE Scheme?
by lispm 3y ago
Scheme renamed them? When did that happen? R5RS? R6RS? R7RS? IEEE Scheme?
- jhbadger 3y agoOkay, you're right. They are there as well. And actually the "first" and "rest" functions aren't even standard but are just there in some implementations as synonyms.
- kagevf 3y agoI know this part of the conversation is focusing on Scheme, but wanted to mention that first and rest are standard CL functions: http://clhs.lisp.se/Body/f_firstc.htm#first http://clhs.lisp.se/Body/f_firstc.htm#first http://clhs.lisp.se/Body/f_rest.htm#rest http://clhs.lisp.se/Body/f_rest.htm#rest
- lispm 3y agoso it actually is like this: Scheme kept car and cdr. Common Lisp added FIRST, REST, SECOND, THIRD, ..., TENTH and some others to the language standard in the early 80s.
- jacknews 3y agolol, as I said, 'kitchen sink'. And then there's all that business with 'caar' 'caaddr', or whatever. I mean, just no.
- lispm 3y agoLisp is old. Thus software from several decades back can run.
- jacknews 3y agoSure, but that's no reason to keep carrying past mistakes. I don't understand why languages don't have a 'version' id as the very first thing, and then you can run appropriate interpreter/compiler given the version. New versions of the language can drop historical mistakes. You could kick-start the process in any existing language by making a next release that requires a version tag (and which maybe strips out a ton of legacy cruft). It would then default to a 'legacy' interpretation if the tag isn't present.
- lispm 3y ago> I don't understand why languages don't have a 'version' id as the very first thing, and then you can run appropriate interpreter/compiler given the version. Common Lisp may have that. My Symbolics Lisp Machine runs six different Common Lisp variants and additionally ZetaLisp side by side in one system. There are often feature symbols which note language versions: CLtL1, CLtL2, ANSI90, ANSI-CL. It also has packages, where LISP will mean symbol table with CLtL1 symbols and COMMON-LISP will mean a symbol table with CLtL2 symbols. > New versions of the language can drop historical mistakes. Lisp may not work that way: Lisp is not just a language, it is a running system. One can load many different libraries and programs into one running Lisp. Some older code will use CAR/CDR and some newer code won't. It still runs side by side in the same ONE environment and will call each other. I can for example say: #+ansi-cl (print "this is code for an ANSI CL compatible Common Lisp") #-ansi-cl (error "this is Common Lisp does not support ANSI CL") This will check if the Common Lisp has the features ANSI-CL. Since cons cells and lists made of cons cells are so fundamental to Lisp, that it would be painful to support software where such a core data structure would be changed (for example by renaming the core operators). Again, code from several decades with different language variants can be running in one Lisp.