[cffi-devel] Re: [fetter-devel] various

Luis Oliveira luismbo at gmail.com
Thu Sep 8 06:51:46 UTC 2005


Rayiner Hashem <rayiner at gmail.com> writes:
> Luis, could I do this with type translators? I'm guessing
> type-translators are already doing the Lisp float to :float
> conversion?

Hmm, it's not the type translators that are doing those
conversions. :float is a built-in type, and those conversions are, erm,
built-in.


> I'd like to do this for strings too.

I don't follow, what do you want to do with strings?


> Does anybody have
> any thoughts on an interface for these sorts of conversions?  My idea
> of manually overriding declarations with more type information is far
> less automatic than what I think people would find convenient.

I don't think it's a good idea to install type translators on
built-in types.

Perhaps a :number type with an (optional?) argument for what type it
should be coerced to.

  ( :number {:int | :long | :float | :double} )

Or a :rational, :lisp-float, etc...? Thoughts?


> 1. I think VZN should export all symbols. It was a total pain
> doingthose manually. Besides, C does not do exported vs. imported, so
> trying not to export all symbols is an "extra". And the cost of that
> extra isthe aggravation of having to manually cobble together all the
> symbols tobe exported.  Okay. Maybe 'export' should become 'supress'?

Well, C sort of does exported/unexported doesn't it? In *NIX (some of the)
unexported stuff will be declared static and in Windows they'll have (or
not) a __declspec(dllexport). In Windows that info can be stored in a
separate (non-C) file though.


> Thanks for all the effort you've put in to finding and reporting bugs!

Ditto.

-- 
Luis Oliveira
luismbo (@) gmail (.) com
Equipa Portuguesa do Translation Project
http://www2.iro.umontreal.ca/~pinard/po/registry.cgi?team=pt




More information about the cffi-devel mailing list