From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noah Lavine Newsgroups: gmane.lisp.guile.devel Subject: Re: Using libunistring for string comparisons et al Date: Sat, 19 Mar 2011 10:53:50 -0400 Message-ID: References: <336042.33326.qm@web37901.mail.mud.yahoo.com> <878vwgmhah.fsf@netris.org> <511668.33680.qm@web37902.mail.mud.yahoo.com> <87sjuokniq.fsf@netris.org> <118142.11911.qm@web37907.mail.mud.yahoo.com> <87ipvjlvgj.fsf@netris.org> <87lj0bi4qs.fsf@netris.org> 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: dough.gmane.org 1300546441 26349 80.91.229.12 (19 Mar 2011 14:54:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 19 Mar 2011 14:54:01 +0000 (UTC) Cc: Andy Wingo , =?ISO-8859-1?Q?Ludovic_Court=E8s?= , guile-devel@gnu.org To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Mar 19 15:53:56 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q0xXQ-0004nD-D3 for guile-devel@m.gmane.org; Sat, 19 Mar 2011 15:53:56 +0100 Original-Received: from localhost ([127.0.0.1]:45942 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0xXP-0004LY-ST for guile-devel@m.gmane.org; Sat, 19 Mar 2011 10:53:55 -0400 Original-Received: from [140.186.70.92] (port=44672 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0xXM-0004LE-ID for guile-devel@gnu.org; Sat, 19 Mar 2011 10:53:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0xXL-0003Mn-E3 for guile-devel@gnu.org; Sat, 19 Mar 2011 10:53:52 -0400 Original-Received: from mail-vx0-f169.google.com ([209.85.220.169]:37989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0xXL-0003MT-66; Sat, 19 Mar 2011 10:53:51 -0400 Original-Received: by vxk12 with SMTP id 12so5296154vxk.0 for ; Sat, 19 Mar 2011 07:53:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=1EYziZQzyXs90FsDMl1g8oq7FwFu1BoUiagoCEtccZ0=; b=ZAZTKaRAKLFiymOpkfySN9WS2cFz896/RJiOWjGHIUaiT225scgEtc0nV1nz7QaS0Y hpB72scHDkPy1lB9RNOEr/haobi7TOCBwcyuDr6U4HkFMpGOa3y154VEOd1NybqMwph/ jVbctzJ2CszuowRvI0p0/msMPGjnbdt4dvSS8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=m2YVrb7EgapoxV8yFMZdd6UwK6nURT23u1ErYl3T3erR/foP3fv4FL/nu37OpY8q3P 0u2n2L4HGpg3rahReqP2ScK8QFQv/22WmL4f23iWJ5wVJDeS1ZHZW1e5Eddz19wTvn5j SiAohCswXB32MatiM6Pza8pS7BMMLLgx/7lKc= Original-Received: by 10.52.88.136 with SMTP id bg8mr3095929vdb.78.1300546430342; Sat, 19 Mar 2011 07:53:50 -0700 (PDT) Original-Received: by 10.52.166.194 with HTTP; Sat, 19 Mar 2011 07:53:50 -0700 (PDT) In-Reply-To: <87lj0bi4qs.fsf@netris.org> X-Google-Sender-Auth: MAF5kPGAPdAZQ-KSXiMvyHep6q0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.220.169 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11916 Archived-At: Hello all, >> Furthermore, such a default would not restrict our users at all -- they >> can always use the non-_c_ variants with a symbol explicitly constructed >> with (e.g.) scm_from_utf8_symbol. > > We have those convenience functions for a reason. =A0You recently propose= d > several more convenience functions, so apparently you prefer to save > keystrokes like the rest of us. =A0I'm sure our non-english-speaking > comrades feel the same way. I'm afraid I don't know enough about this issue to understand it completely, but some idea seemed a little off. I think there are two questions being conflated here: what Guile's internal string representation should be, and what convenience functions should be provided for users to easily make symbols. The string representation is a somewhat difficult choice involving tradeoffs. However, it seems to me that the functions provided to make symbols should be more or less independent of that. After all, these are *convenience* functions, whose functionality could always be implemented in the more general underlying API. So I think the thing to do here is make a list of what string formats you think people should easily be able to use, and then make convenience functions for each of them. Clearly ASCII is one. Perhaps UTF-8 is another. (Unless of course you mean macros that need to define things at compile time. In that case, you're really limited by C's lack of compile-time computation ability, and I think the only real solution would be to implement a preprocessor that can convert strings to different formats. For instance, Guile could easily be such a preprocessor.) Noah