[plt-scheme] hash tables
On Jul 15, Ivanyi Peter wrote:
> Eli Barzilay <eli at barzilay.org> írta:
>
> > Use #lang scheme. The mzscheme language uses the old names.
>
> Thanks for every answer. However if I use the scheme language then
> the if statement becomes "strange", as it says that the if statement
> must have an else part. (As I remember that was not a requirement in
> R5RS.)
It was not. However, `if' statements with no `else' part are
strange. They're very different than those with an `else' part
because the latter can be use for its value and the former is used
only for side-effects.
So only proper `if's are allowed in the `scheme' language -- use
`when' and `unless' when you want a single sided conditional.
> So... As I understand if I use
>
> (module something mzscheme
>
> then I can have the old name. Has this approach (using the mzscheme
> language) any drawback in version 402?
BTW, getting the old behavior is easy:
(define-syntax old-if
(syntax-rules ()
[(old-if c t) (when c t)]
[(old-if c t e) (if c t e)]))
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!