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

Re: Issues with Unicode



Sebastian Egner scripsit:

> One could start with a SRFI for immutable strings as an add-on
> library---in the hope that the Scheme community will pick it up
> as the primary string type in the distant future.

Actually, getting immutable strings into R6RS would be trivial in
terms of the document:  simply replace the sentence

	String-set! stores CHAR in element K of STRING and returns an
	unspecified value.

in 6.3.5 with the following:

	String-set! returns a string whose elements the same (in the
	sense of eqv?) as those in STRING, with the exception of element
	K, which is instead the same as CHAR.  String-set! may or may
	not return a string which is the same as STRING, but must not
	side-effect STRING.

> People might argue that the primitive strings of R5RS are much
> more efficient than any advanced string type, e.g. ropes. 

That's unequivocally false.  They are faster for string-ref! and
string-set!, may or may not be faster for string-length, and are almost
surely slower for string-append.  and string-copy (for reasonably long
strings).  Unless you mean space-efficient, in which case simple arrays
obviously win.

>         http://portal.acm.org/citation.cfm?id=324139

This is behind a tollbooth, but
http://citeseer.ist.psu.edu/kaplan99purely.html is not.  It's always a
bad idea to cite portal.acm.org URLs on a public mailing list; not all
of us have ACM subscriptions.

-- 
My corporate data's a mess!                     John Cowan
It's all semi-structured, no less.              http://www.ccil.org/~cowan
    But I'll be carefree                        cowan@xxxxxxxx
    Using XSLT
On an XML DBMS.