Number: 916

Date:  1-May-84 18':52':09

Submitter: Sannella.PA

Source: Masinter.pa

Subject: PUTD(NIL --) should give error

Assigned To: 

Attn: 

Status: Closed

In/By: Harmony

Problem Type: Design - Impl

Impact: Minor

Difficulty: Moderate

Frequency: 

Priority: Perhaps

System: Language Support

Subsystem: Storage Formats/Mgt

Machine: 

Disk: 

Lisp Version: 

Source Files: 

Microcode Version: 

Memory Size: 

File Server: 

Server Software Version: 

Disposition: '
["Sannella" "20-Aug-84 18':43':47" Attn': Status':(Fixed->Closed) In/By':]

Description: '
Date': 15 Apr 84 12':53 PST'
From': Masinter.pa'
Subject': PUTD(NIL (LAMBDA --)) works, but can crash system'
To': LispSupport'
cc': LispCore↑'
'
In the current system, PUTD doesn''t check to see if you are giving a definition to NIL. However, the system dies in interesting ways if NIL has a non-NIL definition. I propose making PUTD give an error if NIL has a definition.'
'
On the other hand (I''ve already sent another message on this, to LispSupport), there  is no reason why NIL can''t have a property list. CDR(NIL) and GETPROPLIST(NIL) are two separate entities in Interlisp-D, and we can I think gracefully diverge with Interlisp-10 on this particular one, because I don''t think it will affect any part of the system.'
'
'
[I''m working on some performance tuning of Reduce written in StandardLispInInterlisp in preparation for a visit by some folks from Rand, if you are wondering what is prompting this otherwise unnecessary upheavals. I got screwed by one of their functions that did a PUTD(NIL (LAMBDA ---)) when given faulty args because WINDOW.MOUSE.HANDLER apparently doesn''t do too well if NIL has a definition. ]'
'
-----'
'
Date': 15 Apr 84 14':18 PST'
From': JonL.pa'
Subject': Re': PUTD(NIL (LAMBDA --)) works, but can crash system'
In-reply-to': Masinter.pa''s message of 15 Apr 84 12':53 PST'
To': Masinter.pa'
cc': LispSupport.pa, LispCore↑.pa'
'
Some comparisons from the MacLisp/CommonLisp world':'
'
T and NIL have always had propertylists -- the introduction into MacLisp of PLIST and SETPLIST (by 1970, I believe) were to prevent any identification of these functions with CDR and RPLACD.'
'
T and NIL (NIL, r.i.p.!) are special-cased for value, and can''t be used as variables.'
'
T and NIL are *alleged* to be reasonable funciton names (by the CommonLisp manual and the LispMachineLisp manual), but in fact NIL won''t work': it dies in DEFUN on the LispMachine (with an erroneous error msg) and the MacLisp interpreter and compiler explicitly disallow NIL as a function name, even though DEFUN will "do the right thing".'
'
-----'
'
Date': 18 Apr 84 17':29 PST'
From': Masinter.pa'
Subject': Re': PUTD(NIL (LAMBDA --)) works, but can crash system'
In-reply-to': JonL.pa''s message of 15 Apr 84 14':18 PST'
To': JonL.pa'
cc': Masinter.pa, LispSupport.pa'
'
I made PUTD(NIL anything) cause an error.'
'


Workaround: 

Test Case: 

Edit-By: Sannella

Edit-Date: 20-Aug-84 18':43':47