unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Daniel Colascione <dancol@dancol.org>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] trunk r117002: Correctly treat progn contents as toplevel forms when byte compiling
Date: Tue, 22 Apr 2014 00:25:41 -0400	[thread overview]
Message-ID: <jwv8uqym46i.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <5355D244.2050104@dancol.org> (Daniel Colascione's message of "Mon, 21 Apr 2014 19:21:56 -0700")

>> That's not the kind of example I was thinking if.  Do you have a real
>> example, maybe?
> Try writing a macro that emits a defstruct, then a function that uses
> cl-typep for that struct, all wrapped in the same toplevel progn.

That's getting closer to an actual example.  I still can't think of
a case where you'd want to use cl-typep in this way, tho.

> The reason we have automated tests is to make sure we can maintain this
> "level of detail". That it's not immediately useful to you isn't a
> reason not to include it. I can't believe this issue is even
> contentious: the current behavior is a clear bug.

It's a clear bug if we assume Common-Lisp semantics.  But in many cases,
Elisp chooses to provide simpler semantics, to allow a simpler and/or
more naive implementation.

I'm not yet convinced either way, but claiming it's a bug won't sway me.

We've lived with a "simpler" semantics for 30 years and you're the first
to complain about this limitation, so I'd really want to see clear
evidence that it's worth adding this complexity.

> we'd macroexpand-all?) in addition to emiting defmacros? What if the
> macro generation is implicit, as it is with defstruct, so that the
> top-level form doesn't even realize it has to employ this awful hack?

Yes, the defstruct+typep example above sounds like a good example where
my suggestion is not really workable.


        Stefan



  reply	other threads:[~2014-04-22  4:25 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1WcAcP-0006zy-MJ@vcs.savannah.gnu.org>
2014-04-21 15:09 ` [Emacs-diffs] trunk r117002: Correctly treat progn contents as toplevel forms when byte compiling Stefan Monnier
2014-04-21 17:44   ` Daniel Colascione
2014-04-21 22:09     ` Stefan Monnier
2014-04-21 22:29       ` Daniel Colascione
2014-04-22  2:09         ` Stefan Monnier
2014-04-22  2:21           ` Daniel Colascione
2014-04-22  4:25             ` Stefan Monnier [this message]
2014-04-22  4:46               ` Daniel Colascione
2014-04-22 15:06                 ` Stefan Monnier
2014-04-22 17:22                   ` Daniel Colascione
2014-04-22 18:13                     ` Daniel Colascione
2014-04-22 18:37                       ` Stefan Monnier
2014-04-22 19:08                         ` Daniel Colascione
2014-04-22 18:44                       ` Drew Adams
2014-04-22 19:23                         ` Daniel Colascione
2014-04-22 19:59                           ` Drew Adams
2014-04-22 20:10                             ` Daniel Colascione
2014-04-22 20:41                               ` Drew Adams
2014-04-22 21:05                                 ` Daniel Colascione
2014-04-23  0:50                                 ` Stephen J. Turnbull
2014-04-22 18:29                     ` Stefan Monnier
2014-04-22 15:20                 ` Stefan Monnier
2014-04-22 17:04                   ` Daniel Colascione

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=jwv8uqym46i.fsf-monnier+emacsdiffs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=dancol@dancol.org \
    --cc=emacs-devel@gnu.org \
    /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 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).