Re: compute-system-path needs a call to string to accept keywords for module-name.
Marco Antoniotti <[email protected]> Thu, 12 Feb 2004 11:55:13 -0500
| Newsgroups | gmane.lisp.clocc.general |
|---|---|
| Message-ID | <[email protected]> |
On Thursday, Feb 12, 2004, at 11:31 America/New_York, John Foderaro wrote: > >>> You can have it both ways, (a) or (b) >>> >>> (symbol-name 'cl:car) ==> "CAR" >>> >>> or >>> >>> (symbol-name 'cl:car) ==> "car" >>> >>> What you want is >>> >>> (find-symbol "cAr") ==> #S(SYMBOL :NAME <"CAR" or "car" or "Car" or >>> ... > :package "CL") >>> > > > You keep bring up find-symbol. At this point I don't care about > find-symbol. > All I want to know is what symbol-name returns. It's a string > and I might want to use that string to create other strings. > Are you saying that my program can't know what symbol-name returns > since that depends on the package name case and if I'm writing > some utility function I can't know ahead of time what the > package-name-case > of each package will be when this function is loaded in to lisp? In a certain sense yes. For CL you, as an implementor, have the liberty of choosing if you want lowercase of uppercase or mixed case symbols. As a user I do not want to care. I will just know that the CL package is a "handle with care" package. If you want you can also add an extra property for packages with PACKAGE-SYMBOL-NAME-CASE set to :IGNORE that records what is the original setup. In the case of the CL package you can have :UPCASE or :LOWERCASE (or something else) >>> (note: no dynamic >>> *package-symbol-name-case* available) > > are you saying that you have to decide the package-symbol-name-case > at system build time? You need to decide at package definition time. When you call DEFPACKAGE or MAKE-PACKAGE. > In that case you're going to have to either have it set to make > ANSI code that you might want to import happy or you're going > to have to have two images (which is the thing about the ACL solution > that you don't like). Either way you can't get by with exactly > one Modern image. No. For legacy packages I assume that the PACKAGE-SYMBOL-NAME-CASE will be set to :IGNORE. That is why FIND-SYMBOL is crucial here. For *new* packages you have full control. What you are asking is whether you can do (setf (package-symbol-name-case some-package) <some agreed upon key>) I think this should be restricted by establishing rules for "upgrading". As I said, my proposal is not fool proof. > > I may have misunderstood things because again I haven't seen > the whole proposal. The proposal is in the thread I sent you. Doing a Google on SYMBOL-NAME-CASE will bring it up. Eventually I will go through the exercise of writing it up. I would be happy if anybody suggested an avenue for publication :) > >>> ... and I still am wondering what were you guys thinking while >>> writing >>> the standard (you were there, weren't you?) :) > > This is a sensitive subject to me. I argued strongly for a > Modern Lisp (though it wasn't called Modern then). > At the time we had Franz Lisp which was a Modern Lisp yet it > was able to make use of large libraries of ANSI-type code (including > Macsyma) without changing a line of the imported code. > So there was no issue of leaving Lisp code behind if we looked > ahead and saw that Modern mode was the wave of the future. > > However the case-insensitive crowd won and I can't say why > without disparaging a few people who are still around and I > don't want to do that. ... allllriiight! :) Let's not go there then. :) I am sorry, but right now I really do not have the time to go on on this. I actually should have not brought it up in the first place. At this point it is just a purely academic exercise for me. I will try to clean up the proposal and put it up somewhere. But not today or next week :) Cheers Marco -- Marco Antoniotti http://bioinformatics.nyu.edu NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 715 Broadway 10th FL fax. +1 - 212 - 998 3484 New York, NY, 10003, U.S.A. ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click