Re: [r6rs-discuss] Scheme pattern matching & R*RS Adrien "Pied" PiƩrard (15 Dec 2010 02:23 UTC)
Re: [Scheme-reports] [r6rs-discuss] freshmen & unicode lambda's Peter Kourzanov (15 Dec 2010 09:28 UTC)

Re: [Scheme-reports] [r6rs-discuss] freshmen & unicode lambda's Peter Kourzanov 15 Dec 2010 09:28 UTC

On Wed, 2010-12-15 at 11:22 +0900, Adrien "Pied" Piérard wrote:
> >> > If we did this, we should also allow GREEK SMALL LETTER LAMBDA.  In fact,
> >> > it would be preferable, I think, as it has a standard HTML escape: λ
> > In my Emacs v23 (Ubuntu Linux), this letter resolved to "l" (as did the
> > *LAMDA version), not something like 𝝺 .
>
> How did you try to input it?

Emacs M-x ucs-insert

> In my emacs (23 on FreeBSD), "C-8 <enter> 03bb" did insert the GREEK
> SMALL LETTER LAMDA properly
> In vim, "C-K l *" and "C-V U 03bb" both input the lambda properly.
> It looks like "λ".

Yes, this works in VIM (so I do have the fonts installed).
In Emacs 23 (both 23.1+1-4ubuntu7.1 and Lucid 23.1+1-4ubuntu7) it
doesn't. BTW, all other lambda's (bold, italic, sans-serif, 5
combinations in total) do work.

I believe we should allow both (lambda) and λ representations, as
using the real λ can greatly reduce verbosity of Scheme. It gives
a direct visual clue on where the abstraction is (so, thus I am
against (^ is confusing with exponentiation) or (\ is too much
like / and character escape)).

Regarding freshmen, I think we should also extend the semantics of
λ in the process (keeping original lambda unchanged of course),
e.g., for pattern-matching. Don't you think that
________________________________________________________________________

(map [λ #t x => (f x) | else -> ()] mask list)
________________________________________________________________________

is much easier to grasp and explain than
________________________________________________________________________

(map (lambda (b x) (cond (b (f x)) (else '()))) mask list)
________________________________________________________________________

(In fact, while typing it in Evolution mail client I have already
forgotten one closing paren...)

Having coached 4 master students, I believe a typical issue with
freshmen and Scheme is, still, parentheses. So to cope with those
they are already forced to use better editors like VIM or Emacs.

This example clearly shows that you can hide many parentheses behind
the extended (or rather: abridged and transmogrified) lambda notation,
and thereby, also include other editors in the range, which do support
Unicode but not Lisp syntax natively:-)

Kind regards,
Pjotr

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports