Re: Better? or less good?

David Christiansen <david-DRnKfiA+q4/[email protected]>
Newsgroups gmane.comp.lang.racket.user,gmane.lisp.scheme.plt
Message-ID <CAF_itEu0QJT+7zBbJyOfjnZ_vsR+Lv0hT5a5x7kfQUwc6xdWjw@mail.gmail.com>
Hi again,

> The latter has the same meaning as this:
>
> (let ((v #t))
>   (if v v fnord))
>
> This is not even a program, because "fnord" has no meaning.

Robby pointed out off-list that I should point out that this is a
feature of Racket, not programming languages in general. In many other
languages, variable references are a runtime feature rather than a
part of the syntax. Here's some Elisp, which makes the other decision:

el> (let ((v t)) (if v v fnord))
t

Similar results are obtained in many languages. Others, however, work
as Racket does in this respect, like Idris:

Idris> let v = True in if v then v else fnord
When checking argument val to constructor Delay:
        No such variable fnord

/David

-- 
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.