all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: "Alan Mackenzie" <acm@muc.de>,
	"Kaushal Modi" <kaushal.modi@gmail.com>,
	"Zack Piper" <zack@apertron.net>,
	"Artur Malabarba" <arturmalabarba@gmail.com>,
	"Aurélien Aptel" <aurelien.aptel@gmail.com>,
	"Emacs developers" <emacs-devel@gnu.org>
Subject: RE: [PATCH] Fix (letrec ((ignore)))
Date: Sun, 13 Dec 2015 09:41:44 -0800 (PST)	[thread overview]
Message-ID: <89886369-1d66-4129-9290-56888a41661c@default> (raw)
In-Reply-To: <20151213121315.GA2680@acm.fritz.box>

>    (let ((foo) ... ) ...)
> 
> is accepted by the interpreter and byte compiler, binding foo to nil.
> Should we make that form invalid, too?

Of course not.  It is helpful to a (human) reader to distinguish
the use of a `(foo  nil)' let-binding from a `(foo)' let-binding.

Some coders use the convention that showing the nil initial
value explicitly indicates that this is the initialization,
whereas `(foo)' indicates that the `let' body will perform
the (real, significant) initialization.

From "Common Lisp, The Language", section Establishing New
Variable Bindings:

"Instead of a list (varj valuej), one may write simply varj.
In this case varj is initialized to nil.  As a matter of style,
it is recommended that varj be written only when that variable
will be stored into (such as by setq) before its first use.
If it is important that the initial value be nil rather than
some undefined value, then it is clearer to write out (varj nil)
if the initial value is intended to mean ``false,'' or
(varj '()) if the initial value is intended to be an empty list."



  reply	other threads:[~2015-12-13 17:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-11 16:11 [PATCH] Fix (letrec ((ignore))) Zack Piper
2015-12-11 20:08 ` Kaushal Modi
2015-12-12 23:10   ` John Wiegley
2015-12-13  4:08     ` Kyle Meyer
2015-12-13 12:13     ` Alan Mackenzie
2015-12-13 17:41       ` Drew Adams [this message]
2015-12-13 22:19         ` Kaushal Modi
2015-12-13 23:05           ` Drew Adams
2015-12-14 18:23       ` John Wiegley
2015-12-14 20:24         ` Alan Mackenzie
2015-12-14 20:25           ` John Wiegley
2015-12-14 20:47             ` David Kastrup
2015-12-14 21:55               ` John Wiegley
2015-12-15 14:14               ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=89886369-1d66-4129-9290-56888a41661c@default \
    --to=drew.adams@oracle.com \
    --cc=acm@muc.de \
    --cc=arturmalabarba@gmail.com \
    --cc=aurelien.aptel@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=kaushal.modi@gmail.com \
    --cc=zack@apertron.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.