[parenscript-devel] Symbol conflicts with eg. alexandria and iterate

Philipp Marek philipp at marek.priv.at
Wed Oct 10 05:22:35 UTC 2012


Hello Vladimir,

thank you very much for your quick answer.


> One way to do it is to use the :shadowing-import-from option
...
> (:shadowing-import-from :alexandria #:for), then you'd need to write
> (ps:for ...for loop...) if you want to write a for loop in Parenscript
> code.
Which is clearly suboptimal, IMO.


>> Or would it be better to make parenscript :USE alexandria and iterate - AFAICS the
>> symbols are unbound anyway (the few that I've looked at), so there should be no
>> problem
>> importing them?
>
> The symbols aren't bound to Common Lisp functions or macros, but they
> have meaning as special forms or macros for the Parenscript compiler.
Well, AFAIU the symbols _identity_ (as seen by EQ) is important; so, if parenscript
would import the symbols from alexandria and iterate, there should be no change in
behaviour, right?

The disadvantage to that solution is that there's a load order dependency; and simply
requiring alexandria, iterate, and other libraries for parenscript is bad, too, because
they might not actually be needed.


Another way I see would be to use the symbol name (like eg. LOOP does) - don't use the
package, but eg. do (EQUAL (SYMBOL-NAME sym) "FOR").

For user-defined functions and so on there's clearly a need to support multiple
packages; but for the keywords that might work.



Opinions?


Regards,

Phil






More information about the parenscript-devel mailing list