lilypond-user
[Top][All Lists]
Advanced

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

Re: A new Scheme tutorial


From: David Kastrup
Subject: Re: A new Scheme tutorial
Date: Mon, 25 Jul 2022 14:51:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Jean Abou Samra <jean@abou-samra.fr> writes:

>> Le 25 juil. 2022 à 09:01, Andrew Bernard <andrew.bernard@mailbox.org> a 
>> écrit :
>> 
>> 
>> Hello Jean,
>> 
>> This is a great effort.
>> 
>> A couple of suggestions. I suppose there are a few web pages with
>> lists of recommended texts for Scheme, but I think it would be great
>> if you added this one to the 'where to go from here' section:
>> 
>> Teach Yourself Scheme in Fixnum Days (ds26gte.github.io)
>> 
>
>
> Gosh, it seems to teach Lisp-style non-hygienic macros instead of
> syntax-rules/syntax-case. That’s heresy against my religion! OK, I
> stop now :-)

syntax-rules/syntax-case introduce a completely new and arbitrary syntax
intended to be human-readable.  That's sort of a counterthesis to the
LISP philosophy of representing programs by the data representation of
their parse tree, skipping a human-readable abstraction for the sake of
making it easy to programmatically generate and analyze programs.

Macros, in contrast, are just a flag on functions telling the evaluator
"evaluate the function result instead of its arguments".  That is an
almost trivial tweak.  More complex, indeed, is the quasiquote mechanism
that operates to a good degree in the LISP reader and makes it
comparatively easy to handle the creation of material suitable as macro
body.

In contrast to syntax-rules/syntax-case this reflects more a philosophy
rather than a religion since it isn't arbitrary.  Using it is more a
matter of understanding rather than learning it.

-- 
David Kastrup



reply via email to

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