[rust-dev] First thoughts on Rust

Masklinn masklinn at masklinn.net
Mon Jan 23 02:43:53 PST 2012


On 2012-01-23, at 05:37 , Kevin Cantu wrote:
> I'm curious though, because I've not used it in depth, what makes NSString
> so good.  What does it do that Haskell's Text and other languages' string
> types don't do?
First-class interaction with grapheme clusters (which it calls "composed characters)[0], I don't remember seeing that in any other language, and good first-class (not tucked in a library hidden out of the way) support for Unicode text manipulation algorithms (lower and upper case conversions, sorting, etc…)

>  And what do you need from a core string library that
> doesn't belong in, say, an extended package of ICU bindings?

As far as I am concerned, any string operation which is defined in Unicode should be either implemented "correctly" (according to unicode) on the string type or not at all (and delegated to a third-party library).

This means, for instance, either string comparisons should implement the UCA or they should be forbidden.

This, of course, does not apply to a bytes/[w8] type, which would operate solely at the byte level.

[0] http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Strings/Articles/stringsClusters.html#//apple_ref/doc/uid/TP40008025


More information about the Rust-dev mailing list