[plt-scheme] required else for if ?
In 1991 I asked Bob Hieb (Kent's Chez Scheme buddy then, and my co-
researcher on theoretical stuff) what the most frequent annoying bug
was in the code. He ranked an accidentally omitted else branch among
the top three. Indeed, he said that because of this, they had agreed
to use WHEN and UNLESS exclusively for cases when they needed a one-
armed IF and that they considered all one-armed uses as a bug or a
legacy issue (which they corrected as soon as they touched a file).
We have chosen to codify their restriction. It's a minor inconvenience
that buys a good deal of clarity.
-- Matthias
On Sep 6, 2009, at 6:35 PM, Doug Evans wrote:
> Noel Welsh wrote:
>> On Sun, Sep 6, 2009 at 8:07 PM, Doug Evans<dje at sebabeach.org> wrote:
>>
>>
>>> How come the default behaviour of `if' in mzscheme is to
>>> require the else clause,
>>> and not have an optional else clause?
>>>
>>
>> This is one of the changes made in the v3 -> v4 transition. It is
>> designed to prevent a class of bugs. The mzscheme language provides
>> backwards compatibility.
>>
>>
>
> Thanks. Can you elaborate on the "class of bugs"?
>
> I realize mzscheme, rnrs, provide "backward" compatibility, but that
> route drags in a lot of other stuff that I don't necessarily want.
>
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme