unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* emacs lisp syntax rfc: (cond (EXPR => (lambda (X) ...)))
@ 2011-01-02 21:45 Thien-Thi Nguyen
  2011-01-02 21:57 ` Fren Zeee
                   ` (4 more replies)
  0 siblings, 5 replies; 25+ messages in thread
From: Thien-Thi Nguyen @ 2011-01-02 21:45 UTC (permalink / raw)
  To: emacs-devel

In Scheme, the expression:

  (cond (EXPR => (lambda (X) ...)))

provides the lambda expression parameter X with the non-false
value computed from evaluating EXPR.  However, if EXPR evaluates
to false, control falls through to the next ‘cond’ clause, as
usual.  The syntax requires the symbol ‘=>’ between EXPR and the
lambda expression, without which the non-false value is discarded
(i.e., the status quo).

What do people think of adding this to Emacs Lisp?  (I would be
grateful for pointers to any previous discussion on the matter.)



^ permalink raw reply	[flat|nested] 25+ messages in thread
* Re: emacs lisp syntax rfc: (cond (EXPR => (lambda (X) ...)))
@ 2011-01-03  5:37 MON KEY
  2011-01-04 17:20 ` Thien-Thi Nguyen
  0 siblings, 1 reply; 25+ messages in thread
From: MON KEY @ 2011-01-03  5:37 UTC (permalink / raw)
  To: emacs-devel

> What do people think of adding this to Emacs Lisp?

Is the proposed symbol for this syntax extension `=>'?

If so, I find the proposed symbol ugly.

`=>' is already a semantically loaded indicator.

Likewise, the individual tokens of `=>' are too visually similiar to
`=' and `>'.

I would prefer either `#=>' or `#->' which might help to convey the
implicit function call involved.

--
/s_P\



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

end of thread, other threads:[~2011-01-11 17:20 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-02 21:45 emacs lisp syntax rfc: (cond (EXPR => (lambda (X) ...))) Thien-Thi Nguyen
2011-01-02 21:57 ` Fren Zeee
2011-01-02 22:52 ` Harald Hanche-Olsen
2011-01-04 16:41   ` Thien-Thi Nguyen
2011-01-04 17:56     ` Harald Hanche-Olsen
2011-01-04 18:39       ` Thien-Thi Nguyen
2011-01-03  2:19 ` Stefan Monnier
2011-01-04 17:00   ` Thien-Thi Nguyen
2011-01-03 16:15 ` Richard Stallman
2011-01-04 18:12   ` Thien-Thi Nguyen
2011-01-05  1:55     ` Stephen J. Turnbull
2011-01-05  3:21       ` Thien-Thi Nguyen
2011-01-05  4:16         ` Stephen J. Turnbull
2011-01-05  5:15           ` Miles Bader
2011-01-05 21:29     ` Stefan Monnier
2011-01-05 22:40       ` Harald Hanche-Olsen
2011-01-06  0:10         ` Stefan Monnier
2011-01-06  8:24           ` Helmut Eller
2011-01-07  3:49             ` Stefan Monnier
2011-01-06 18:43         ` Richard Stallman
2011-01-05 23:36     ` Richard Stallman
2011-01-11 17:20       ` Andy Wingo
2011-01-05  5:17 ` Miles Bader
  -- strict thread matches above, loose matches on Subject: below --
2011-01-03  5:37 MON KEY
2011-01-04 17:20 ` Thien-Thi Nguyen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).