On Thu, Sep 24, 2009 at 11:33:36AM +0100, Alaric Snell-Pym wrote:
> 
> On 24 Sep 2009, at 11:05 am, Christopher Chittleborough wrote:
> 
> > The character==grapheme approach makes strings simple and
> > characters complicated. You'd even need a procedure to
> > construct character values, something like
> >  (make-character BASE_CHAR LIST_OF_MODIFIERS)
> > which I for one find mind-boggling.

I don't find that so mind-boggling.  I find the alternative
to be much worse; requiring all programmers to get this right
in their code results in a lot of duplication of effort and
will often simply be done wrong.

> > Then you need procedures to add/remove/reorder modifiers,
> > etc etc.
> >
> > So we have an alternative to the character==codepoint approach.
> > Is it a good alternative? I don't know.
> 
> I think it is...

+1

> I think the cases were you need to get down into the
> codepoints are probably rarer than the cases where characters are what
> you should be concentrating on. And you can still get at the
> codepoints, when you need to, by picking characters apart.

Maybe someone who has had to do extensive character modification can
chime in?  I have a feeling most people replying here have never needed
to do any substantial cross-language string handling.  (I know I haven't)

> > A good answer to that question will probably have to wait for
> > Perl 6 to be released and put into widespread use.
> 
> Yeah, it'll be good to get feedback on that.

Ah great, maybe we can have it by the time we get to R10RS then!

> > If this approach was adopted, support would have to be optional
> > for the sake of resource-constrained implementations.
> 
> Well, not necessarily; implementations should be free to provide a
> subset of the repertoire, such as that provided by ASCII, but they can
> still provide the API...

Yeah, it would simply be a mostly empty implementation.  No problem there.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth

Attachment: pgpnbysvzv4s2.pgp
Description: PGP signature

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to