From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.user Subject: Re: How to copy hash table? Date: Tue, 27 Jan 2004 10:29:54 -0500 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: References: <1074866297.23547.840.camel@localhost> Reply-To: djurfeldt@nada.kth.se NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1075217864 996 80.91.224.253 (27 Jan 2004 15:37:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 27 Jan 2004 15:37:44 +0000 (UTC) Cc: guile-user@gnu.org, djurfeldt@nada.kth.se Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Jan 27 16:37:33 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AlVHQ-0006EE-00 for ; Tue, 27 Jan 2004 16:37:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AlVEg-0007Bs-E8 for guile-user@m.gmane.org; Tue, 27 Jan 2004 10:34:42 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AlVAu-0005jH-Ay for guile-user@gnu.org; Tue, 27 Jan 2004 10:30:48 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AlVA7-0005M3-3D for guile-user@gnu.org; Tue, 27 Jan 2004 10:30:30 -0500 Original-Received: from [213.212.20.77] (helo=kvast.blakulla.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AlVA6-0005La-G1 for guile-user@gnu.org; Tue, 27 Jan 2004 10:29:58 -0500 Original-Received: from chunk.mit.edu ([18.42.2.92] helo=chunk ident=Debian-exim) by kvast.blakulla.net with esmtp (Exim 3.36 #1 (Debian)) id 1AlVA3-00019h-00; Tue, 27 Jan 2004 16:29:55 +0100 Original-Received: from mdj by chunk with local (Exim 4.30) id 1AlVA2-0006oT-UM; Tue, 27 Jan 2004 10:29:54 -0500 Original-To: Roland Orre , m.vollmer@ping.de In-Reply-To: <1074866297.23547.840.camel@localhost> (Roland Orre's message of "Fri, 23 Jan 2004 14:58:17 +0100") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.2 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 Xref: main.gmane.org gmane.lisp.guile.user:2729 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:2729 Roland Orre writes: > In earlier guiles, where hash-tables were vectors, I used copy-tree to > copy a hash table. Now in guile-1.7 copy-tree of the hash-table gives me > the same hash table back, which I assume is correct for atomic objects. > > What I want is a table where the handles are copies so when modifying the > values in the new table it won't affect the original. > > I guess there exists no trick to generally copy objects. > > (Of course, for now, to overcome this I'm using hash-for-each but I'm > curios about the general issue) You're right that hash-for-each is currently the best way to do it. Do people feel that we should have a primitive hash-copy ? M _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user