[R6RS] Naming for fixnum / flonum ops

Marc Feeley feeley
Mon Jul 4 07:36:51 EDT 2005


On 4-Jul-05, at 3:43 AM, Anton van Straaten wrote:

> An alternative would be to pick some delimiter that's less  
> ambiguous than "-" in this context, e.g. FX:QUOTIENT.  In that  
> case, names like FX+ would still omit the delimiter, because they  
> don't need the same sort of separation between parts of their name.
>

I've proposed in the past that the fixnum and flonum specific  
operations be relegated to libraries and that they (could) be  
accessed with a fully-qualified name.  If we do this, and call the  
libraries "fx" and "fl" respectively, and adopt the notation  
"lib.ident" for fully qualified names, then we would have:

     fl.+          for flonum addition
     fx.quotient   for fixnum quotient, etc

This would be more consistent than using "fx:" and "fl:" identifier  
prefixes that mimick namespaces.  An additional bonus is that the  
library namespace management declarations can be used (to rename the  
operations, to avoid the "fl." in flonum intensive code, etc).

Marc



More information about the R6RS mailing list