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: cannot compile: srfi-10 define-reader-ctor 'hash '#,( Date: Thu, 14 Aug 2014 12:53:24 +0300 Message-ID: <874mxfv1m3.fsf@elektro.pacujo.net> References: <87y4w9jog8.fsf@drakenvlieg.flower> <874myvudnk.fsf@gnu.org> <87y4vaf3fr.fsf@drakenvlieg.flower> <87a97buix8.fsf@gnu.org> <878ums17q3.fsf@drakenvlieg.flower> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1408010032 13597 80.91.229.3 (14 Aug 2014 09:53:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Aug 2014 09:53:52 +0000 (UTC) Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , "guile-user@gnu.org" To: Panicz Maciej Godek Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Aug 14 11:53:45 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 1XHrj4-0007Zd-Ab for guile-user@m.gmane.org; Thu, 14 Aug 2014 11:53:42 +0200 Original-Received: from localhost ([::1]:52981 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHrj3-0005bB-NX for guile-user@m.gmane.org; Thu, 14 Aug 2014 05:53:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHrip-0005b5-Hp for guile-user@gnu.org; Thu, 14 Aug 2014 05:53:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHrij-0004Z9-D1 for guile-user@gnu.org; Thu, 14 Aug 2014 05:53:27 -0400 Original-Received: from pacujo.net ([83.150.83.132]:46371) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHrij-0004Z4-5K; Thu, 14 Aug 2014 05:53:21 -0400 Original-Received: from elektro.pacujo.net (192.168.1.200) by elektro.pacujo.net; Thu, 14 Aug 2014 12:53:24 +0300 Original-Received: by elektro.pacujo.net (sSMTP sendmail emulation); Thu, 14 Aug 2014 12:53:24 +0300 In-Reply-To: (Panicz Maciej Godek's message of "Thu, 14 Aug 2014 11:19:51 +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:11404 Archived-At: Panicz Maciej Godek : > Scheme already has a nice representation for associactions, namely the > assoc lists. However, they are a bit problematic, because they are > ordered by nature and hence there's not much one can do with their > linear access time. When we are talking about the representation of a mapping, it will be a full content dump, thus O(n) regardless. You don't gain anything by adding substructure to the assoc list. When you read in the collection, you can put it in the data structure of your choice (with alist->hash-table, for example). Sexps are perfectly suitable to represent any imaginable data. Circular sexps create funny effects in guile, though. Try inputting '(1 . #0#) to the (guile-1.8) reader. Unfortunately, even (define a '(1 . #0#)) fails to finish. Compare this with elisp, which is perfectly happy with: (setq a '#0=(1 . #0#)) Marko