unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* λ the ultimate showcase
@ 2009-09-10 15:40 Ludovic Courtès
  2009-09-10 17:37 ` Ludovic Courtès
  2009-09-10 19:27 ` Neil Jerram
  0 siblings, 2 replies; 4+ messages in thread
From: Ludovic Courtès @ 2009-09-10 15:40 UTC (permalink / raw)
  To: guile-devel

Hey,

Now that we have Unicode, let’s not put it to good use!

  (define-syntax λ
    (syntax-rules ()
      ((_ formals body ...)
       (lambda formals body ...))))

Should ‘boot-9.scm’ provide this macro?

Ludo’.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: λ the ultimate showcase
  2009-09-10 15:40 λ the ultimate showcase Ludovic Courtès
@ 2009-09-10 17:37 ` Ludovic Courtès
  2009-09-10 19:27 ` Neil Jerram
  1 sibling, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2009-09-10 17:37 UTC (permalink / raw)
  To: guile-devel

ludo@gnu.org (Ludovic Courtès) writes:

> Now that we have Unicode, let’s not put it to good use!

Someone must have tampered with my message.  Of course, it should read
“let’s put it to good use”.

Ludo’.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: λ the ultimate showcase
  2009-09-10 15:40 λ the ultimate showcase Ludovic Courtès
  2009-09-10 17:37 ` Ludovic Courtès
@ 2009-09-10 19:27 ` Neil Jerram
  2009-09-10 21:46   ` Ludovic Courtès
  1 sibling, 1 reply; 4+ messages in thread
From: Neil Jerram @ 2009-09-10 19:27 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guile-devel

ludo@gnu.org (Ludovic Courtès) writes:

> Hey,
>
> Now that we have Unicode, let’s not put it to good use!
>
>   (define-syntax λ
>     (syntax-rules ()
>       ((_ formals body ...)
>        (lambda formals body ...))))

Can it be overridden?  Just in case someone writes an algorithm where
they'd really like to have λ as a variable?

(In other words, I guess, can define-syntax things in general be
overridden?)

> Should ‘boot-9.scm’ provide this macro?

If the answer to the above is Yes, definitely.

     Neil




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: λ the ultimate showcase
  2009-09-10 19:27 ` Neil Jerram
@ 2009-09-10 21:46   ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2009-09-10 21:46 UTC (permalink / raw)
  To: guile-devel

Neil Jerram <neil@ossau.uklinux.net> writes:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Hey,
>>
>> Now that we have Unicode, let’s not put it to good use!
>>
>>   (define-syntax λ
>>     (syntax-rules ()
>>       ((_ formals body ...)
>>        (lambda formals body ...))))
>
> Can it be overridden?

Yes.  In the end it boils down to ‘module-define!’.

> Just in case someone writes an algorithm where they'd really like to
> have λ as a variable?

One can always use ‘λ’ or ‘lambda’ as a local variable name:

  (let ((λ 2))
    (+ λ 3))

> If the answer to the above is Yes, definitely.

Cool, let’s do it!  :-)

(Then we’ll want “’” for ‘quote’, “‘” for ‘quasiquote’, etc. etc.)

Thanks,
Ludo’.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-09-10 21:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-10 15:40 λ the ultimate showcase Ludovic Courtès
2009-09-10 17:37 ` Ludovic Courtès
2009-09-10 19:27 ` Neil Jerram
2009-09-10 21:46   ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).