From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Francis Moreau Newsgroups: gmane.emacs.help Subject: Re: One more question about elisp Date: Sat, 7 Nov 2009 06:41:07 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <53781544-57b8-4cde-a07a-c3632d8bac7f@a32g2000yqm.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1257608470 6933 80.91.229.12 (7 Nov 2009 15:41:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 7 Nov 2009 15:41:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 07 16:41:02 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N6nPJ-0003Pw-01 for geh-help-gnu-emacs@m.gmane.org; Sat, 07 Nov 2009 16:40:53 +0100 Original-Received: from localhost ([127.0.0.1]:46588 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N6nPI-0007UA-BR for geh-help-gnu-emacs@m.gmane.org; Sat, 07 Nov 2009 10:40:52 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!postnews.google.com!m38g2000yqd.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 26 Original-NNTP-Posting-Host: 82.235.205.153 Original-X-Trace: posting.google.com 1257604867 2112 127.0.0.1 (7 Nov 2009 14:41:07 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 7 Nov 2009 14:41:07 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: m38g2000yqd.googlegroups.com; posting-host=82.235.205.153; posting-account=ekTE0goAAADiVCThPmo4ph0C5bTUhQOx User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.14) Gecko/2009090905 Fedora/3.0.14-1.fc10 Firefox/3.0.14, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:174509 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:69583 Archived-At: On 7 nov, 02:40, LanX wrote: > On 6 Nov., 22:05, Francis Moreau wrote: > > > It sounds strange to me (knowing C, python) to use hash tables to > > structure data. > > You never used dicts in python for structured data??? No since python is known to be an object oriented language, if I want to create an object, I'm defining a new class. I don't use a hash table for that. C allows to define new type. So I won't use a hash table to do that. But I can understand that elisp has no way to create new types, and hash tables can serve the purpose although I'm wondering how the code will be readable (yes I already found elisp quite hard to read). > IIRC an object instance =A0(like in your example) is actually just a > dictionary and "dictionary" is just the python way to say hash table. That's an implementation detail. The way you access fields of an object through a hash table doesn't mean that an object is equivalent to a hash table. Thanks