[plt-scheme] Requiring SRFIs

From: Richard Cobbe (cobbe at ccs.neu.edu)
Date: Tue Jul 1 16:11:21 EDT 2008

On Tue, Jul 01, 2008 at 01:17:31PM -0600, Chongkai Zhu wrote:
> According to the implementation, srfi/48 provides s:format but not format.
>
> Given that we can import modules with names that shadows the lang we are
> using (in a module), is it time to remove all the s: prefix for srfis?

That sounds like a bad idea to me.  If we remove the prefix, then it would
be all too easy for an unsuspecting developer who doesn't know the full
interface of SRFI n (or some other module) to shadow one of the scheme
language's built-in indentifiers unexpectedly, with resulting behavior
that's hard to debug.

On the other hand: speaking personally, I almost always require SRFIs with
an explicit prefix, to avoid this exact problem.  It'd be nice to be able
to, in this case, refer to srfi-48:format instead of srfi-48:s:format.

On the third hand: expecting users to specify their own prefix for
SRFIs/modules is not a suitable general solution.  It's especially not
sufficient if omitting the prefix can silently cause bugs in the manner
described above.

Richard


Posted on the users mailing list.