From ... From: Erik Naggum Subject: Re: A modest proposal (long) Date: 2000/03/01 Message-ID: <3160943130779380@naggum.no>#1/1 X-Deja-AN: 592001023 References: <3160886469599216@naggum.no> <89jv80$6p9$1@nnrp1.deja.com> mail-copies-to: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsmaster@eunet.no X-Trace: oslo-nntp.eunet.no 951955944 21625 195.0.192.66 (2 Mar 2000 00:12:24 GMT) Organization: Naggum Software; vox: +47 8800 8879; fax: +47 8800 8601; http://www.naggum.no User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.5 Mime-Version: 1.0 NNTP-Posting-Date: 2 Mar 2000 00:12:24 GMT Newsgroups: comp.lang.lisp * Bill Newman | It's not just a beginner problem. The program | (DEFUN FOO (X) (BAR X)) | (DEFVAR X) | means something different from | (DEFVAR X) | (DEFUN FOO (X) (BAR X)) | And if the DEFVAR is in one file, and the DEFUN is in another, then the | semantics change silently depending on what order you compile them in. I maintain that this is a beginner problem, only. real Lisp programmers don't call their global variables "X". real Lisp programmers use packages if they want their symbols to stay of other people's face. real Lisp programmers know about unintern, too. | I'd say this is a design flaw that makes them not particularly safe. it's a design flaw to you because your notion of safe is wrong. | (By the way, I've considered making SBCL issue STYLE-WARNINGs for any | SPECIAL use of non-*FOO*-style symbols, and any non-SPECIAL use of | *FOO*-style symbols, to detect problems like this. But I'm a little | uncomfortable embedding informal naming conventions in the compiler, so | I've avoided doing this so far. Does anyone have any opinions on whether | such STYLE-WARNINGs would be The Right Thing?) I have already said what I think is the right thing here: demand that there be lexically apparent declarations that reiterate the special status of symbols so declared globally. lacking such a declaration, you might issue a style-warning for free variables even if you know they are globally declared special. it will lead to slightly more verbose code, but the excuse to be making invisible, pervasive changes would go away. | Yes, I also really wish there was a standard way to query "is symbol FOO | special?" And "what's the value of the optimization property BAR?" too.. precisely, and this is the _only_ problem worth solving as I see it. #:Erik