John Nagle
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
John Nagle
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
> I don't think LastIndex needs to be UTF8-aware.
It does if you're wanting the rune index and not the byte offset of
the sub-string.
Actually, in general not a single one of the quoted above propertieshold for UCS-2.
> The Go documentation is really really good, and easy to read,
The Go documentation tends to gloss over the design
defects of the language. Fanboy enthusiasm is not helping
fix this mess.
John Nagle
Such a heated discussion. I'd just like to put here, that Objective-C's NSString seems to be using UTF-8 too.
John, you are very focused on the shortcomings of Go without seeming to acknowledge that *any* approach to character encoding has its tradeoffs.
Go bakes utf8 deep into the language, so go programmers need to understand utf8. (Fortunately, utf8 is simple- it was designed on a napkin in a diner!) This is in keeping with the kind of level at which Go programmers are expected to operate, which should be unsurprising to anyone who has spent time with the language.
Nobody here claims Go is perfection, but a great deal of thought was put into the design of Go's strings. You are ignoring that, and that makes you seem rude.
Andrew
Never attribute to marketing that which is adequately explained by oversight.
If you think there are omissions in our docs, please file an issue.
Andrew
On 4/7/2013 12:29 AM, Andrew Gerrand wrote:
> John, you are very focused on the shortcomings of Go without seeming to
> acknowledge that *any* approach to character encoding has its tradeoffs.
That's because the documents for Go gloss over the shortcomings.
They read like marketing materials. There are some design decisions
in Go which can induce hard to find bugs, and possible security
holes, in Go programs. Shared data between parallel tasks is one
area in which that is the case. String representation is another.
You write "Go bakes utf8 deep into the language, Go programmers need
to understand utf8." I agree. "Effective Go" does not make
such a statement. Nor does the documentation for the "strings"
package. That's what I'm talking about.
John Nagle