From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.emacs.devel Subject: Re: [dieter@duenenhof-wilhelm.de: image-dired (tumme) database file not existing] Date: Fri, 20 Jul 2007 05:25:44 +0000 Message-ID: <20070720052544.GA480@www.trapp.net> References: <87y7hcxz5x.fsf@ambire.localdomain> <7dbe73ed0707190803s2e4d341bxad6368085041af21@mail.gmail.com> <87sl7kxv4p.fsf@ambire.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1184909766 9091 80.91.229.12 (20 Jul 2007 05:36:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 Jul 2007 05:36:06 +0000 (UTC) Cc: dieter@duenenhof-wilhelm.de, emacs-devel@gnu.org, Mathias Dahl To: Thien-Thi Nguyen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 20 07:36:01 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IBl9k-0005KV-SP for ged-emacs-devel@m.gmane.org; Fri, 20 Jul 2007 07:36:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IBl9k-0004PQ-DD for ged-emacs-devel@m.gmane.org; Fri, 20 Jul 2007 01:36:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IBl9g-0004PL-WC for emacs-devel@gnu.org; Fri, 20 Jul 2007 01:35:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IBl9e-0004P9-Gs for emacs-devel@gnu.org; Fri, 20 Jul 2007 01:35:55 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IBl9e-0004P6-AL for emacs-devel@gnu.org; Fri, 20 Jul 2007 01:35:54 -0400 Original-Received: from alextrapp1.equinoxe.de ([217.22.192.104] helo=www.elogos.de) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IBl9d-00070Q-TW for emacs-devel@gnu.org; Fri, 20 Jul 2007 01:35:54 -0400 Original-Received: from www.elogos.de (localhost [127.0.0.1]) by www.elogos.de (Postfix) with ESMTP id BD2654B5B8; Fri, 20 Jul 2007 05:25:44 +0000 (UTC) Original-Received: by www.elogos.de (Postfix, from userid 4000) id B20EF4B60E; Fri, 20 Jul 2007 05:25:44 +0000 (UTC) Content-Disposition: inline In-Reply-To: <87sl7kxv4p.fsf@ambire.localdomain> User-Agent: Mutt/1.5.9i X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:75148 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, Jul 19, 2007 at 05:37:10PM +0200, Thien-Thi Nguyen wrote: > () "Mathias Dahl" > () Thu, 19 Jul 2007 17:03:09 +0200 >=20 > Instead of making each function make sure a db file exist, why not > change code like this: >=20 > (find-file image-dired-db-file) >=20 > into this: >=20 > (find-file (image-dired-db-file)) >=20 > And inside that new defun basically do what you did in your new func= tion. >=20 > 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=C3=A1s -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFGoEdYBcgs9XrR2kYRAqi2AJ4jv2yy/gkyGAN2KZxdSPedeDDoJACeLYwD hpCgxQeciSR5/rCECJSN6DQ=3D =3DnNo9 -----END PGP SIGNATURE-----