[Gauche-devel] redefining "define" does not result in an error
R7RS Scheme scripting engine
Status: Beta
Brought to you by:
shirok
|
From: <Dek...@Ya...> - 2010-07-21 22:48:43
|
In Gauche 0.9, redefining "define" does not result in an error, contradicting Section 5.3 of the "Revised^5 Report on the Algorithmic Language Scheme" (see http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-8.html); _viz._: gosh> (define define 3) define gosh> define 3 gosh> (define first car) *** ERROR: invalid application: (3 #0=#<subr car> #0#) Stack Trace: _______________________________________ gosh> Section 5.3 specifically states the following: > ... it is an error for a definition or syntax definition to shadow a > syntactic keyword whose meaning is needed to determine whether some form > in the group of forms that contains the shadowing definition is in fact > a definition.... For example, the following are errors: > > (define define 3) Perhaps this discrepancy should be resolved. -- Benjamin L. Russell -- Benjamin L. Russell / DekuDekuplex at Yahoo dot com http://dekudekuplex.wordpress.com/ Translator/Interpreter / Mobile: +011 81 80-3603-6725 "Furuike ya, kawazu tobikomu mizu no oto." -- Matsuo Basho^ |