Re: compute-system-path needs a call to string to accept keywords for module-name.
Marco Antoniotti <[email protected]> Wed, 11 Feb 2004 23:22:39 -0500
| Newsgroups | gmane.lisp.clocc.general |
|---|---|
| Message-ID | <[email protected]> |
On Wednesday, Feb 11, 2004, at 21:17 America/New_York, John Foderaro
wrote:
>
> As they say: "The devil's in the details" and thus you really need
> to have a hand-wave free proposal in order to be able to evaluate it.
>
> Let me tell what what I think is the most important feature of Modern
> mode: What You See Is What You Get.
>
> (symbol-name 'foo) -> "foo"
> (symbol-name 'Foo) -> "Foo"
> (symbol-name 'FOO) -> "FOO"
>
> Everything we use these days (text editor, html editor, word
> processor, pda)
> is wysiwyg.
> I will judge any proposal by how well it provide wysiwyg. If I have
> to
> remember some complex set of rules to know what symbol-name is going to
> return then I'm not going to be happy.
If the READTABLE-CASE were :PRESERVE (which I think is a natural thing
to do) and
(PACKAGE-SYMBOL-NAME-CASE *PACKAGE*) ==> :PRESERVE
and
(not (eq *package (find-package "COMMON-LISP"))) ==> T
then you would get exactly what you are proposing, even if you assumed
that (PACKAGE-USE-LIST *package*) contained "COMMON-LISP" and, as
assumed,
(PACKAGE-SYMBOL-NAME-CASE "CL") ==> :IGNORE.
SYMBOL-NAME would be looked up in a case-insensitive way, while the
other symbols would be looked up in a case sensitive way.
I.e., with the standard *PRINT-CASE* setting to :UPCASE,
(Find-Symbol "foo") ==> |foo|
(find-symbol "Foo") ==> |Foo|
(fInD-syMBoL "FOO") ==> FOO
*PRINT-CASE* should be extended as well with :PRESERVE to get the full
wysiwyg behavior.
The same for the example you sent me in private.
(mapcar #'SYMBOL-NAME '(Help me find a car))
==> ("Help" "me" "find" "a" "car")
There are some gotchas, but I think it would save the goat and the
cabbage. You do not have to remember any complex rules. You just have
to set things right. All in all with the following settings
(READTABLE-CASE *READTABLE*) ==> :PRESERVE
(PACKAGE-SYMBOL-NAME-CASE "CL") ==> :IGNORE
(PACKAGE-SYMBOL-NAME-CASE *PACKAGE*) ==> :PRESERVE
*PRINT-CASE* ==> :PRESERVE
You should get your wysiwyg behavior. I also think that the values
above reflect this intention.
>>>> I'm not sure what you mean by 'propose' here. Propose to whom?
>
>> Well, at least to your customers.
>
> Ever since 1985 when we started writing our Common Lisp it has
> had a Modern mode. In fact when the Common Lisp image is built
> it has always started out in Modern mode and if the target is
> an ANSI mode image then at some point it switches to to ANSI mode.
> We didn't publicize the Modern mode ability of our Lisp in the early
> years
> since the overwhelming sentiment seemed to be for a case
> insensitive reader (although in-house we all did Modern mode
> programming).
> I haven't done any polls of the user community but I'd guess
> that case-sensitive programming is now becoming acceptable
> (but not overwhelmingly so).
> In the last few months we have been tossing around ideas for
> a single image that can support both Modern and ANSI modes in
> a way that makes both Modern and ANSI users happy.
> It's a very tricky problem and we continue to study the idea.
>
> I will say that it *is* easy to write code that works in either
> ANSI or Modern mode, I've been doing it for 19 years and others
> at Franz have been doing so as well. So ANSI vrs Modern
> isn't a big deal. You use the mode you prefer.
Yes it isn't all that difficult to write portable code, now that we
know how to work around it. I just think that my (admittedly complex)
proposal would give more power to the programmer and allow you to
really mix standard and modern mode in a better way.
In any case, while I think it is a good idea, I do not know whether it
makes much sense to push it, given, as you said, that now you can work
around ansi and modern mode.
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