[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A new Scheme tutorial (Jean Abou Samra)
From: |
Jean Abou Samra |
Subject: |
Re: A new Scheme tutorial (Jean Abou Samra) |
Date: |
Sun, 24 Jul 2022 13:28:13 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 |
Ouch! I see what you mean. And this is meant to be simplified? But the
problem really is that if a user tries to use an identifier with an
illegal syntax, how do they know? This is rather like those really
annoying websites which ask you to choose a password, and then tell
you that it's illegal without telling you why.
Simple: don't use too weird identifiers :-)
I'll try to rephrase that part again. The point of mentioning this is
to explain that '+', '-', '*', '/' are just procedures, not special
syntax, and to address the question that I imagine this immediately raises
in the mind of a reader used to more mainstream programming languages:
"what, a procedure called '+', is that really valid"? There are also
two conventions that are useful to know:
- question mark at the end of a predicate (explained later in
the tutorial),
- exclamation mark at the end of a side-effecting procedure
(I'm not showing any of these in this basic tutorial, so
I didn't explain it).
It's not really encouraged to get creative about special characters in
your variable names. Just stick with the conventions.
Cheers,
Jean