empty lambda

34 views
Skip to first unread message

ceving

unread,
Oct 30, 2023, 6:06:28 AM10/30/23
to chibi-scheme
Why is it ok to have an empty begin but no empty lambda?

ceving

unread,
Oct 30, 2023, 6:37:29 AM10/30/23
to chibi-scheme
Why I ask: SICP chapter 4 implements begin as a sequence and does not allow empty sequences. But most Schemes allow an empty begin at least at top level.

For example "(begin)" is ok for Chez, but "(display (begin))" is not. Chibi does not care and displays undef.

Why is there so much inconsistency? What is the benefit?

Alex Shinn

unread,
Nov 2, 2023, 2:57:03 AM11/2/23
to chibi-...@googlegroups.com
We allow empty begins in definition context (not just top-level) for macros which can expand into 0 or more definitions.
Such macros can't output a dummy expression (e.f. #f or unspecified) in such a case because this is not a definition.

--
Alex

--
You received this message because you are subscribed to the Google Groups "chibi-scheme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chibi-scheme...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chibi-scheme/34f7f46a-ad8c-4c00-8e60-2e29c5c84f9an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages