[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new string library

From: Ben Pfaff
Subject: Re: new string library
Date: Sat, 10 Jun 2006 14:42:36 -0700
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

John Darrington <address@hidden> writes:

> In the GUI code I had been using GString from GLib.  It was very
> similar to pspp's old struct string class.  The main difference that I
> noticed was that unlike struct string, GString's data member was
> always null terminated which made life a lot easier.

Why?  I don't see the utility.  Most of the time, you don't need
a null-terminated string.  When you do need a null-terminated
string, call ds_cstr().

> I'm a little concerned at the CC_* macros:
> 1.  There are already similarly named symbols in data/settings.c used
>     for things pertaining to Custom Currency; Overloading the CC_
>     prefix might cause confusion.

Good point.

> 2.  Obvously macros like CC_ALNUM are only correct for the C locale.
>     Not a problem so long as everyone's aware of it, but naive
>     programmers might make some mistakes ...

I'm aware of the problem and trying to think of a good solution.
Unfortunately, i18n seems to be difficult no matter what you do.
"...In the UNIX world, people tend to interpret `non-technical user'
 as meaning someone who's only ever written one device driver."
--Daniel Pead

reply via email to

[Prev in Thread] Current Thread [Next in Thread]