From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marko Rauhamaa Newsgroups: gmane.lisp.guile.user Subject: Re: A couple of questions about goops method parameters Date: Fri, 05 Sep 2014 23:51:02 +0300 Message-ID: <87tx4liyfd.fsf@elektro.pacujo.net> References: <1409905923.9245.5.camel@Renee-desktop.suse> <871trpridm.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <87lhpxg6ta.fsf@taylan.uni.cx> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1409950297 3819 80.91.229.3 (5 Sep 2014 20:51:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Sep 2014 20:51:37 +0000 (UTC) Cc: Carlos Pita , David Thompson , "guile-user@gnu.org" To: Panicz Maciej Godek Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Sep 05 22:51:28 2014 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XQ0Tf-0002Z8-Od for guile-user@m.gmane.org; Fri, 05 Sep 2014 22:51:27 +0200 Original-Received: from localhost ([::1]:60172 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQ0Tf-0008NQ-D0 for guile-user@m.gmane.org; Fri, 05 Sep 2014 16:51:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQ0TP-0008Hh-98 for guile-user@gnu.org; Fri, 05 Sep 2014 16:51:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XQ0TJ-0002af-2p for guile-user@gnu.org; Fri, 05 Sep 2014 16:51:11 -0400 Original-Received: from pacujo.net ([83.150.83.132]:37927) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQ0TI-0002aV-RJ for guile-user@gnu.org; Fri, 05 Sep 2014 16:51:05 -0400 Original-Received: from elektro.pacujo.net (192.168.1.200) by elektro.pacujo.net; Fri, 5 Sep 2014 23:51:03 +0300 Original-Received: by elektro.pacujo.net (sSMTP sendmail emulation); Fri, 5 Sep 2014 23:51:03 +0300 In-Reply-To: (Panicz Maciej Godek's message of "Fri, 5 Sep 2014 22:37:49 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 83.150.83.132 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:11469 Archived-At: Panicz Maciej Godek : > There are other representations (like basket list or assoc list) that > avoid that problem, but they generate other ones -- namely, that the > access times get linear, and in case of assoc lists there is a huge > overhead of data, and in case of basket lists one needs to pass around > additional information regarding the names of subsequent fields. Dynamic programming languages lack a true, efficient dot notation. That's a price I'm willing to pay (especially since Guile allows me to switch to C where necessary). For example, Python and JavaScript translate x.f into a hash table lookup. In my tests, Guile's alists are more efficient than hash tables up to maybe a hundred elements or so (IIRC). That's why I switched to alists in my tiny object system. As for the data overhead, I haven't yet really run into that problem. Again, high memory use is a common issue with dynamic programming languages. Python's objects are quite sizable as well. Marko