chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Placing "gensyms" in own namespace?


From: Kon Lovett
Subject: [Chicken-users] Placing "gensyms" in own namespace?
Date: Mon, 27 Nov 2006 17:42:18 -0800

Hi Folks,

Looking at the current psyntax source I notice the use of 'gensym?'. Now, given the Chez Scheme providence, the use of this makes sense. However, implementing it in Chicken requires changes.

1) It isn't needed for psyntax since use of "annotations" can compensate. But it does mean a faster expander w/o annotations isn't likely.

2) Implementing in Chicken isn't hard; just means use of the "qualified symbol" facility. Below are 2 ideas:

Place gensyms in a namespace (i.e. qualified symbols). Either a "real" namespace, such as (gensym) => '##$#g123' or a "fake" namespace where the maxlen of namespace name is reduced to 30 & a symbol string len of 31 means a gensym (w/ some extra overhead in the "library.scm" 'split' procedure). Read/write invariance is an issue though.

The 2nd idea above is similar to the way keywords are identified.

(BTW, this doesn't have anything to do w/ munged exported module symbols - the "xxx$$yyy" stuff.)

Best Wishes,
Kon






reply via email to

[Prev in Thread] Current Thread [Next in Thread]