[plt-dev] Pre-Release Checklist for v4.2

From: Dave Herman (dherman at ccs.neu.edu)
Date: Fri May 22 12:22:24 EDT 2009

> I would like to know why #<undefined> isn't utilized more - or, 
> alternatively, why it exists in the first place. Is there a real 
> difference between no value (my mental model for #<void>) and an 
> undefined/uninitialized value (my mental model for #<undefined>)?

I think your mental model is pretty accurate: #<undefined> is primarily 
used for mutable entities that are only very briefly uninitialized. It's 
supposed to be extremely rare, especially because mutation is used much 
more sparingly in Scheme than other languages. By contrast, #<void> is 
used for side effects that don't need to provide any useful result. 
That's not at all rare.

By and large, my experience has been that if #<undefined> shows up 
somewhere in a program, there's probably a bug, whereas #<void> has lots 
of useful places to show up.

Dave


Posted on the dev mailing list.