[racket-dev] Internal definitions in `define'

From: Eli Barzilay (eli at barzilay.org)
Date: Fri Dec 30 03:36:27 EST 2011

I was against it for similar reasons, but the question is whether
there's a technical point that makes it a bad choice.

As for making errors: I changed my mind when I though about the
symmetry argument -- using the same argument, I'd expect to do the
exact same kind of mistakes with functions, but I don't think that
I've ever had one.  Another factor is that if you think about possible
mistakes, then I take it as a point in favor of doing this, since it
reduces the number of parens as well as getting rid of the familiar
(define foo (let () ...stuff...)) thing which should result in less

8 hours ago, Robby Findler wrote:
> I'm mildly against it, since it seems too easy to make parenthesis
> errors that are very confusing (ie if you move a paren from the end
> of one define to the end of a following define, the errors will get
> strange).
> Robby
> On Thu, Dec 29, 2011 at 1:08 PM, Eli Barzilay <eli at barzilay.org> wrote:
> > Does anyone know of a reason to not have an implicit `begin' in a
> > plain definition, translated into an implicit (let () ...) in racket?
> >
> > When I see things like this:
> >
> >  http://stackoverflow.com/questions/8667403
> >
> > I think that people expect the syntax of `define' to be uniform, so if
> > you can switch these:
> >
> >  (define (foo x) (+ x 1))
> >  (define foo (+ 8 1))
> >
> > then the expectation is for the same to work when there are multiple
> > expressions.
> >
> > --
> >          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
> >                    http://barzilay.org/                   Maze is Life!
> > _________________________
> >  Racket Developers list:
> >  http://lists.racket-lang.org/dev

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.