[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do feel people about the following change in syntax?

From: David Kastrup
Subject: Re: How do feel people about the following change in syntax?
Date: Thu, 20 Oct 2011 18:36:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

David Kastrup <address@hidden> writes:

> Now here is one thing worth considering: currently the predicate scheme?
> is defined as
> (define-public (scheme? x) #t)
> I lean towards defining it instead as
> (define-public (scheme? x) (not (eq? x (begin))))
> so that it will accept anything _except_ void expressions.
> Does that appear like a good idea?

Ugh, it means that define-void-function can't be a special case of
define-scheme-function: define-void-function will always return a void
expression, and define-scheme-function is defined to return a value of
type scheme?, so Lilypond would protest if you tried to return a void
expression and probably return #f after flagging an error.

define-scheme-function is pretty young, so perhaps disallowing it from
returning void expressions makes some sense without all too much
compatibility pain as long as define-void-function is available for
functions not returning anything.

Is it ok if I do this as one commit series?

David Kastrup

reply via email to

[Prev in Thread] Current Thread [Next in Thread]