From: Michael J. Ferrador
Subject: non-munged programmatically generated symbol and package names ?
Date: 
Message-ID: <DArfe.32043$RP1.260@fe10.lga>
After some newbie searching/reading -

If instead of compiling foreign source to sexp, or
If I need to spit back out a processed foreign source...

would |Foreign_Named| symbols and packages be OK ?


kinda like *specials*, +locals+, and %internals% being highlighted. or
should name-munge/-demunge be required for every first parsing project?
From: Pascal Bourguignon
Subject: Re: non-munged programmatically generated symbol and package names ?
Date: 
Message-ID: <87is1twacj.fsf@thalassa.informatimago.com>
"Michael J. Ferrador" <·····@orn.com> writes:

> After some newbie searching/reading -
>
> If instead of compiling foreign source to sexp, or
> If I need to spit back out a processed foreign source...
>
> would |Foreign_Named| symbols and packages be OK ?

Perfectly.


> kinda like *specials*, +locals+, and %internals% being highlighted. or
> should name-munge/-demunge be required for every first parsing project?

It's different (note: all these exemples are with the default *readtable*):

      (symbol-name '*special*)  -->  "*SPECIAL*"
      (symbol-name '+constant+) -->  "+CONSTANT+"
      (symbol-name '%internal%) -->  "%INTERNAL%"

but:

      (symbol-name '|Foreign_Named|) -->  "Foreign_Named"
      (symbol-name '|*special*|)     -->  "*special*"
      (symbol-name '|+constant+|)    -->  "+constant+"
      (symbol-name '|%internal%|)    -->  "%internal%"

|xx| is a lisp reader mechanism to prevent the application of the
*readtable*, which converts the name of the symbol either to upcase,
dowcase, invertcase or identity before interning it.

The rest is only naming conventions.

You could write too:

     (symbol-name 'F|oreign|_N|amed|)       --> "Foreign_Named"
or:
     (symbol-name 'f\o\r\e\i\g\n_n\a\m\e\d) --> "Foreign_Named"

Finally:

[284]> 'f\o\r\e\i\g\n_n\a\m\e\d
|Foreign_Named|
[285]> '*special*
*SPECIAL*
[286]> (let ((*print-readably* t)) 
          (print '*special*) (print 'f\o\r\e\i\g\n_n\a\m\e\d))

|COMMON-LISP-USER|::|*SPECIAL*| 
|COMMON-LISP-USER|::|Foreign_Named| 
|Foreign_Named|
[287]> 

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

This is a signature virus.  Add me to your signature and help me to live