[plt-dev] make eval namespace argument mandatory

From: Ryan Culpepper (ryanc at ccs.neu.edu)
Date: Wed Mar 17 17:58:52 EDT 2010

Sam Tobin-Hochstadt wrote:
> On Wed, Mar 17, 2010 at 5:48 PM, Ryan Culpepper <ryanc at ccs.neu.edu> wrote:
>> For racket, I propose we make the namespace argument to the 'eval' function
>> mandatory. It's currently optional, and one-arg 'eval' is an attractive
>> nuisance. If programmers have to specify the evaluation context---especially
>> if they have to read up on namespaces to figure out how to get one---they
>> are less likely to expect magical behavior from one-arg 'eval'.
> 
> I agree.
> 
>> For scheme, I think we should leave it alone but perhaps mark it as
>> deprecated in the docs.
>>
>> The same argument could in principle be made for anything that implicitly
>> uses (current-namespace), but I think 'eval' is by far the largest source of
>> problems.
> 
> I would also suggest than anything the operates on the
> current-namespace *without* at least an optional namespace argument be
> fixed.  A few examples are: `namespace-require',
> `namespace-require/copy', `namespace-symbol->identifier',
> `namespace-syntax-introduce'.

I agree.

Ryan


Posted on the dev mailing list.