[racket] in praise of if's mandatory else clause

From: Ray Racine (ray.racine at gmail.com)
Date: Mon May 30 06:17:54 EDT 2011

Found some of those, incorrectly dangling 'if's as well when I first ported
to racket/base, but I can tell you the bigger surprise was what I found when
I ported from racket/base to typed/racket/base.

On Sun, May 29, 2011 at 2:17 AM, Neil Van Dyke <neil at neilvandyke.org> wrote:

> Anecdote of "if" mandatory else clause being a win...
> Porting some "#lang mzscheme" app code to "#lang racket/base", one of the
> tedious tasks is fixing all the "if" syntax that doesn't have an else
> clause.  I decided to fix the "if" forms manually, rather than with Emacs
> macrology, just in case there was anything I didn't just want to make an
> "and".  Doing it manually turned out to be fortunate, since Racket has
> already found *five* independent (i.e., not copy&pasted) locations where the
> programmers clearly intended to do "(if B E1 E2)", but instead did something
> else, usually "(if B E1) E2".  I won't be surprised if I find a few more by
> the time all the code compiles.
> Also, I doubt the programmers would have made these oopses, had they been
> using recent DrRacket, which does paren-matching that's hard to ignore.  I'm
> probably going to make Quack force more prominent paren-matching than Emacs
> does by default.  I'll also probably add my M-arrow sexp movement key
> bindings to Quack, to encourage sexp-based movement.
> --
> http://www.neilvandyke.org/
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users

The object of life is not to be on the side of the majority, but to escape
finding oneself in the ranks of the insane. - Marcus Aurelius
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20110530/da3032a1/attachment.html>

Posted on the users mailing list.