From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel Subject: Re: GH replacement proposal (includes a bit of Unicode) Date: Mon, 24 May 2004 20:51:04 +0200 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87isel64mf.fsf@zagadka.ping.de> References: <40812F4B.3080700@dirk-herrmanns-seiten.de> <873c65be76.fsf@zagadka.ping.de> <40A5E7C8.9080409@dirk-herrmanns-seiten.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1085442357 13699 80.91.224.253 (24 May 2004 23:45:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 24 May 2004 23:45:57 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue May 25 01:45:51 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 1BSP8g-0000Xn-00 for ; Tue, 25 May 2004 01:45:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BSP2l-0005RO-E4 for guile-devel@m.gmane.org; Mon, 24 May 2004 19:39:43 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BSOx2-00049f-4g for guile-devel@gnu.org; Mon, 24 May 2004 19:33:48 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BSLHa-00035J-GQ for guile-devel@gnu.org; Mon, 24 May 2004 15:39:18 -0400 Original-Received: from [195.253.8.218] (helo=mail.dokom.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BSLF9-0002V0-6P for guile-devel@gnu.org; Mon, 24 May 2004 15:36:15 -0400 Original-Received: from [195.138.44.29] (helo=zagadka.ping.de) by mail.dokom.net with smtp (Exim 3.36 #3) id 1BSKaN-00041i-00 for guile-devel@gnu.org; Mon, 24 May 2004 20:54:07 +0200 Original-Received: (qmail 11102 invoked by uid 1000); 24 May 2004 18:51:04 -0000 Original-To: Dirk Herrmann In-Reply-To: <40A5E7C8.9080409@dirk-herrmanns-seiten.de> (Dirk Herrmann's message of "Sat, 15 May 2004 11:50:00 +0200") User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3753 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3753 Dirk Herrmann writes: > Marius Vollmer wrote: > >> Hmm, yes, that might make sense. However, the -1 idiom is pretty >> much standard for this kind of interface, no? > > I personally don't like this kind of 'one value, several meanings' paradigm: > > - What, if instead of -1, you pass -2? [...] > - Readability suffers. [...] Yes, I agree that the -1 idiom is not self explaining, but it is well established and people will instantly recognize it. I'd even argue that they will expect to be able to pass -1 for a 'len' parameter and will be annoyed when they find out that Guile doesn't allow it. > Note that with scm_from_locale_memory there will probably be no > readability problem either, since whoever calls > scm_from_locale_memory must be aware of the length, such that the > call will typically look like > > SCM s = scm_from_locale_memory (str, len); > > with "len" being hopefully some sensible name, thus leading to > self-documenting code. This can be had with scm_from_locale_string as well, of course. When you write SCM s = scm_from_locale_string (str, len); thats just as readable, I'd say. Soo, I'm inclined to leave it as it is... -- GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel