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

Predefined nfx considered harmful

This page is part of the web mail archives of SRFI 105 from before July 7th, 2015. The new archives for SRFI 105 contain all messages, not just those from before July 7th, 2015.

The current SRFI-105 updated draft says:
> An implementation <em>must not</em>, by default, bind the symbol
&#8220;<var>nfx</var>&#8221; to a procedure, macro, or syntax
that <em>cannot</em> be overridden."

I'm thinking that perhaps it should stronger, e.g., that the default environment shouldn't bind the symbol (or if it does, bind it to something that always produces an error/raises an exception).

If anyone wrote code that depended on some local implementation of nfx, then by *definition* it would become implementation-dependent.  Yet the point of the "nfx" macro is to allow application authors the ability to *control* what to do in that case, not to make them unwittingly dependent on an implementation.

Of course, an implementation could provide a pre-canned macro that could be used as a definition of nfx.  But then pulling in that library would be an explicit act, easily seen in the code, instead of being hidden.  I don't object to implementation-defined procedures.. but it should be easy to find when they're being used.


--- David A. Wheeler