I've noticed that beginning student language does not allow definition
of a function which takes no arguments.  For instance:

  (define (foo) 3)
  =>
  define: expected at least one argument name after the function name, but 
found none in: (foo)

It's not obvious to me why this is the case.  I can sort of guess at the
reasoning, and it makes some sense -- such a function is obviously not a
pure function, or 

  (define (foo) r)
  (... (foo) ...)

could be adequately replaced by

  (define foo 3)
  (... foo ...)

but I'm teaching a sixth grader who's coming to Racket from LOGO (and
starting HtDP), and she would like to reproduce some of the things she's
done with turtle graphics using Racket and graphics/turtles.  It would
be nice to be able to, eg, translate

  to circle
    right 1
    forward 1
    circle
  end

into

  (define (circle)
    (turn 1)
    (draw 1)
    (circle))

without giving up on the other safety precautions provided by BSL.

Thoughts?  Is there a way to turn this check off without moving up to
another racket language?

-- 
                                Jim Wise
                                [email protected]

Attachment: pgpOR682XhjL5.pgp
Description: PGP signature

_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to