Luke J Crook <[EMAIL PROTECTED]> writes:

> Surendra Singhi wrote:
>> Luke J Crook <[EMAIL PROTECTED]> writes:
>>
>>   
>>>>> %feature("export");     //start exporting symbols  
>>>>>         
>>> Could you add support for the 4 ways of exporting from a package?: 
>>>
>>> 1) (:export #:spotlight) 
>>>
>>> 2) (:export :spotlight) 
>>>
>>> 3) (:export "spotlight") 
>>>
>>> 4) (:export 'spotlight) 
>>>
>>>     

SWIG uses the fourth option.

>>
>> Why is 4 ways of exporting required?
>>
>>   
> All the lispbuilder-* bindings currently use the (1). This post 
> describes the differences between them.
>
> http://www.lispniks.com/pipermail/gardeners/2006-May/001322.html
>


I think the way the bindings are created and exported, the explanation in the
mail is not applicable in this scenario. 

One will need to declare the current-package, for the export function to work
(or everything will be exported from the default package).

So, there is no question of name conflicts. 

,----
|   "Using keywords wastes memory, since all those symbols get interned in the
| KEYWORD package" 
`----

Since keywords are not being used, so no waste of memory. 


,----
| Using uninterned symbols is
| slightly inefficient, since a new symbol has to be created
| each time you use it.  
`----
We are creating an interned symbol, this should not be inefficient.


,----
| Using strings makes your code
| non-portable to Lisps that do *not* convert symbol names to
| upper case, such as Allegro CL in "modern" mode.
`----

Not using strings.

So, it seems the current 4th way is the best one.

-- 
Surendra Singhi
http://ssinghi.kreeti.com, http://www.kreeti.com

,----
| "All animals are equal, but some animals are more equal than others."
|     -- Orwell, Animal Farm, 1945
`----

_______________________________________________
application-builder mailing list
[email protected]
http://www.lispniks.com/mailman/listinfo/application-builder

Reply via email to