News for hackers. Stuff that matters.
Re:Parsing can become accidentally quadratic because of sscanf by dmit on Monday March 01, 2021 @06:08PM (#26309765)
I submitted a patch to support decimal commas when parsing timestamps in Go in 2013. I thought this was a slam dunk because while major users of decimal dots include USA, China, India, and Japan, the decimal comma is used by pretty much every other country in the world. Going from ~40% support to ~99.9% support seemed like an obvious win.

Rob Pike politely declined the patch, commenting "I might prefer to leave it unaddressed for the moment. Proper locale treatment is coming (I hope soon) and this seems like the wrong place to start insinuating special locale handling into the standard library."

Three years later another Go team member commented that "Date localization is definitely still in the planning."

We're in year 8 now. The issue is still open. Rob Pike is still hoping.

Re:Parsing can become accidentally quadratic because of sscanf by boogies on Monday March 01, 2021 @07:12PM (#26310307)
> ~40% support to ~99.9% support

№ of countries ≠ № of people though. ⅘ of the 5 most populous countries¹ use decimal points, and together they alone² have ~42½% of the world’s people. Do all decimal point countries together have ≤50%? (Edit: Is it really not “normal” to do things the Anglophone way?)

¹According to https://en.wikipedia.org/wiki/List_of_countries_and_dependen...

²Not counting territories

Re:Parsing can become accidentally quadratic because of sscanf by nicoburns on Monday March 01, 2021 @06:58PM (#26310201)
This is where Rust's decision to keep such functions out of the standard library entirely starts to look pretty smart.
Re:Parsing can become accidentally quadratic because of sscanf by tyg13 on Monday March 01, 2021 @11:30PM (#26311915)
Wow, taking a look at the related issues, they are really hostile towards fixing this particular pain point. I knew Go had a reputation for being condescending and opinionated, but I had no idea it was this bad.

https://github.com/golang/go/issues/6189

https://github.com/golang/go/issues/26002

https://github.com/golang/go/issues/27746

https://github.com/golang/go/issues/36145

Re:Parsing can become accidentally quadratic because of sscanf by fomine3 on Monday March 01, 2021 @07:21PM (#26310375)