unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Le Wang <l26wang@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: when to call provide, first or last?
Date: Mon, 27 Feb 2012 09:25:25 -0500	[thread overview]
Message-ID: <jwvpqd01how.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAM=K+ipL3QmkNbQLz3=zLACNoFGY70W+F0cY222jvL-Wd_VM3g@mail.gmail.com> (Le Wang's message of "Mon, 27 Feb 2012 21:42:34 +0800")

>> Actually, such mutual dependencies aren't desirable
> Can you elaborate on this a little?  In my mind if two files implement
> different parts of the same libraby, it's quite natural for mutual
> dependencies to occur.

It's actually rare.  Most program decompositions result in *layering*,
with no or very few mutual recursions.  Mutual recursions also can be
tricky: it's easy to get ill-founded recursions if you're not
paying attention.

Even more so if you're only testing your code in "interpreted" mode,
since the byte-compiler will execute the top-level code (especially
macro-expansions) in a different order, so the problem may not appear in
your testing.

Again, nothing terribly important to rule out such things, but enough to
discourage them.


        Stefan



  reply	other threads:[~2012-02-27 14:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-27 12:47 when to call provide, first or last? Le Wang
2012-02-27 12:59 ` Juanma Barranquero
2012-02-27 13:09   ` Le Wang
2012-02-27 13:25     ` Juanma Barranquero
2012-02-27 13:32       ` Le Wang
2012-02-27 13:44         ` Juanma Barranquero
2012-02-27 13:57           ` Le Wang
2012-02-27 14:05             ` Drew Adams
2012-02-27 13:35 ` Stefan Monnier
2012-02-27 13:42   ` Le Wang
2012-02-27 14:25     ` Stefan Monnier [this message]
2012-02-27 15:08     ` Harald Hanche-Olsen
2012-02-27 15:46       ` Le Wang

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=jwvpqd01how.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=l26wang@gmail.com \
    /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).