From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: eval-after-load not harmful after all (Was: Re: Why js-2mode?) Date: Mon, 10 Aug 2009 10:01:21 -0700 Message-ID: <998B83F771474211A37D1E2B6A497B61@us.oracle.com> References: <7b501d5c0908091634ndfba631vd9db6502db301097@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1249923836 8206 80.91.229.12 (10 Aug 2009 17:03:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Aug 2009 17:03:56 +0000 (UTC) Cc: 'CHENG Gao' , 'Carsten Dominik' , emacs-devel@gnu.org To: "'Daniel Colascione'" , "'Leo'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 10 19:03:48 2009 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 1MaYHh-0005tn-RL for ged-emacs-devel@m.gmane.org; Mon, 10 Aug 2009 19:03:46 +0200 Original-Received: from localhost ([127.0.0.1]:42512 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MaYHg-0008N1-WF for ged-emacs-devel@m.gmane.org; Mon, 10 Aug 2009 13:03:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MaYFe-0007Yh-4K for emacs-devel@gnu.org; Mon, 10 Aug 2009 13:01:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MaYFZ-0007Wi-Ks for emacs-devel@gnu.org; Mon, 10 Aug 2009 13:01:37 -0400 Original-Received: from [199.232.76.173] (port=49159 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MaYFZ-0007Wb-8D for emacs-devel@gnu.org; Mon, 10 Aug 2009 13:01:33 -0400 Original-Received: from acsinet12.oracle.com ([141.146.126.234]:18485) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MaYFX-0004Mf-N8 for emacs-devel@gnu.org; Mon, 10 Aug 2009 13:01:32 -0400 Original-Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by acsinet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n7AH0xTI019496 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 10 Aug 2009 17:01:00 GMT Original-Received: from abhmt003.oracle.com (abhmt003.oracle.com [141.146.116.12]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n7AH1Qpv027919; Mon, 10 Aug 2009 17:01:26 GMT Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 10 Aug 2009 10:01:21 -0700 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcoZz/AQ5LXlcyrLQvmAEPQh0fJDUAACEtiQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 In-Reply-To: X-Source-IP: abhmt003.oracle.com [141.146.116.12] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090205.4A805264.0143:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) 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:113983 Archived-At: In Icicles, I sometimes `require' other libraries explicitly. But in a few cases I use `eval-after-load' instead - for exactly the kind of thing that Carsten described. I agree with Daniel, Carsten, and others that `eval-after-load' should not be demonized. The manual's text should be changed to suggest using it only when appropriate - and then describe when it might be appropriate. IOW, we should _explain_ this, so users understand it. --- The manual sometimes seems to have difficulty dealing with the tradeoff of providing (a) simple guidelines and (b) information that can suggest behavior that runs counter to the simple guidelines in particular contexts. (No, I don't have specific passages in mind, off the top of my head.) The Elisp manual is above all a reference manual. Users expect it to be fairly complete, even if that sometimes means presenting complex material that is not black-and-white. The idea is to _both_ (a) give the 80-95% general guideline (and its rationale) and (b) give additional info that can address the other 20-5% of use cases. What's important is to explain what's happening and why: rationale, use cases, maybe examples. The two, opposite dangers are: (1) Oversimplifying, presenting only a "rule" that gets memorized, promulgated, and promoted like a catechism. Not sufficiently teaching the why: what's happening, rationale, exceptions, use cases. (2) Not sufficiently drawing attention to the main practice that we recommend for general use most of the time. Drowning the reader in a complex mass of countervailing considerations. It's not necessarily easy to get this right, to handle both the general case and the specifics. Providing rationale and reasoning goes a long way to presenting these two sides. The goal, after all, is not just respect of "the rule" but user understanding.