From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Dzhus Newsgroups: gmane.emacs.devel Subject: Re: fadr Date: Mon, 22 Jun 2009 20:27:44 +0400 Message-ID: <87y6rkp727.fsf@sphinx.net.ru> References: <87zlc0s3np.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1245688315 13999 80.91.229.12 (22 Jun 2009 16:31:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Jun 2009 16:31:55 +0000 (UTC) Cc: Nick Roberts , dima@sphinx.net.ru, emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 22 18:31:51 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 1MImQv-00065S-Fx for ged-emacs-devel@m.gmane.org; Mon, 22 Jun 2009 18:31:49 +0200 Original-Received: from localhost ([127.0.0.1]:56572 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MImQu-0002tU-Pc for ged-emacs-devel@m.gmane.org; Mon, 22 Jun 2009 12:31:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MImQo-0002sQ-0S for emacs-devel@gnu.org; Mon, 22 Jun 2009 12:31:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MImQi-0002oR-Gm for emacs-devel@gnu.org; Mon, 22 Jun 2009 12:31:41 -0400 Original-Received: from [199.232.76.173] (port=50859 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MImQi-0002oK-AY for emacs-devel@gnu.org; Mon, 22 Jun 2009 12:31:36 -0400 Original-Received: from sphinx.net.ru ([82.146.58.194]:52159) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MImQh-0002L8-Fb for emacs-devel@gnu.org; Mon, 22 Jun 2009 12:31:36 -0400 Original-Received: from blizzard (95-24-82-94.broadband.corbina.ru [95.24.82.94]) (authenticated bits=0) by sphinx.net.ru (8.14.3/8.14.2) with ESMTP id n5MGVRdL016389; Mon, 22 Jun 2009 20:31:28 +0400 (MSD) (envelope-from dima@sphinx.net.ru) In-Reply-To: <87zlc0s3np.fsf@stupidchicken.com> (Chong Yidong's message of "Mon, 22 Jun 2009 11:12:58 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: FreeBSD 6.x (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:111637 Archived-At: Thanks for seeing my code. Chong Yidong wrote: > * It's completely unclear what "fadr" stands for. If we keep this > file, we must rename it to something less cryptic. Fast adressing. > * More fundamentally, I think the way this library works is misguided. > The example given in the commentary says: > > (setq basket '((apples . (((color . green) (taste . delicious)) > ((color . red) (taste . disgusting)))))) > > Its contents may be accessed using `fadr-member': > (fadr-member basket ".apples[1].color") > red > > If I understand correctly, this smacks of trying to shoehorn C > structure-addressing habits into Emacs Lisp. Passing a "black-box" > string argument like ".apples[1].color" is ugly and un-Lispy. It seemed to me to be not lispy enough from the very beginning, but I couldn't think of a better replacement, with =C2=ABbetter=C2=BB meaning =C2= =ABallowing to write compact yet expressive code=C2=BB. The problem with fadr is that it's deliberately untyped. > Unless there is some overriding reason, I think the GDB-MI project > should drop the fadr dependency. If you need a way to interface easily > with nested structures, I suggest using Common Lisp structures, i.e. the > `defstruct' macro which has been in cl-macs.el for a long time. I didn't know about this, thanks for pointing out at this facility. I'm familiar with similar kind of structures from some experience I had with Scheme. I'll see how I can fit this in my code to work with GDB/MI responses. I should use `(eval-when-compile (require 'cl))`, right? --=20 Happy Hacking. http://sphinx.net.ru =E3=82=80