[racket] Why the value of a literal expression can be changed?

From: ZhengLingyun (konghuarukhr at 163.com)
Date: Wed Mar 12 04:29:32 EDT 2014


R5RS "4.1.2 Literal expressions" says:
As noted in section 3.4, it is an error to alter a constant (i.e. the value of a literal expression)
using a mutation procedure like set-car! or string-set!.

I test the expression (set-car! '(1 2 3) 4) is ok in several implementations include DrScheme.
I think '(1 2 3) here is a literal expression, why it can be changed? 

Dustin Zheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140312/fb150233/attachment-0001.html>

Posted on the users mailing list.