unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: tomas@tuxteam.de
To: Thien-Thi Nguyen <ttn@gnuvola.org>
Cc: dieter@duenenhof-wilhelm.de, emacs-devel@gnu.org,
	Mathias Dahl <mathias.dahl@gmail.com>
Subject: Re: [dieter@duenenhof-wilhelm.de: image-dired (tumme) database file not existing]
Date: Fri, 20 Jul 2007 05:25:44 +0000	[thread overview]
Message-ID: <20070720052544.GA480@www.trapp.net> (raw)
In-Reply-To: <87sl7kxv4p.fsf@ambire.localdomain>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, Jul 19, 2007 at 05:37:10PM +0200, Thien-Thi Nguyen wrote:
> () "Mathias Dahl" <mathias.dahl@gmail.com>
> () Thu, 19 Jul 2007 17:03:09 +0200
> 
>    Instead of making each function make sure a db file exist, why not
>    change code like this:
> 
>    (find-file image-dired-db-file)
> 
>    into this:
> 
>    (find-file (image-dired-db-file))
> 
>    And inside that new defun basically do what you did in your new function.
> 
> well, i considered that, too, but decided against it due to the
> following reasoning (somewhat muddied by the summer heat):
[...]
> of course, one could argue lots of file-exists-p calls are no big
> deal, but i would not be that one.  (half-informed philosophical
> mumbling follows) what we see here is the basic tension between
> functional programming and the real world (external) state...
> change happens but is it the root or the leaves that must react?

Ah, philosophy, let's jump in ;-)

One aspect that IMHO deserves mention is that Mathias' approach is more
change-friendly. If a third, not-so-knowledgeable hacker (e.g. me) tries
to fix something, (s)he is less probable to screw things up.

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFGoEdYBcgs9XrR2kYRAqi2AJ4jv2yy/gkyGAN2KZxdSPedeDDoJACeLYwD
hpCgxQeciSR5/rCECJSN6DQ=
=nNo9
-----END PGP SIGNATURE-----

  reply	other threads:[~2007-07-20  5:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-19 12:23 [dieter@duenenhof-wilhelm.de: image-dired (tumme) database file not existing] Richard Stallman
2007-07-19 14:10 ` Thien-Thi Nguyen
2007-07-19 15:03   ` Mathias Dahl
2007-07-19 15:37     ` Thien-Thi Nguyen
2007-07-20  5:25       ` tomas [this message]
2007-07-20  6:44         ` Thien-Thi Nguyen
2007-07-20  8:10           ` tomas
2007-07-21 23:36   ` Mathias Dahl
2007-07-21 23:49     ` Thien-Thi Nguyen
2007-07-22 18:36       ` Richard Stallman

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=20070720052544.GA480@www.trapp.net \
    --to=tomas@tuxteam.de \
    --cc=dieter@duenenhof-wilhelm.de \
    --cc=emacs-devel@gnu.org \
    --cc=mathias.dahl@gmail.com \
    --cc=ttn@gnuvola.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).