Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Deus Rex
Mar 5, 2005

This thread ought to "go" ... back to GBS that is! :c00l:

etcetera08 posted:

json doesn't have the concept of other number types. http://golang.org/pkg/encoding/json/#Unmarshal
You can, however, force it to use Numbers. http://golang.org/pkg/encoding/json/#Decoder.UseNumber

JSON's only concern with numbers is their parse; their representation upon deserialization is an implementation decision. An implementation typically uses 64-bit floats only for compatibility with the lowest common denominator prosumer of JSON: Javascript.

Deus Rex fucked around with this message at 22:24 on May 7, 2014

Adbot
ADBOT LOVES YOU

Deus Rex
Mar 5, 2005

Voted Worst Mom posted:

What's wrong with type assertions?

They fail at run time, superior type systems don't need them (or even have them), maintaining and accessing type information at run time is prohibitively expensive for some cases.

Deus Rex
Mar 5, 2005

polpotpotpotpotpot posted:

Yeah, caring about how gofmt is formatting your poo poo indicates you don't understand how great gofmt is.

That's not a very strong argument. If gofmt formatted each of your files into a single line, would you still feel that way?

It's possible to simultaneously feel that a tool like gofmt is a great idea, and also that the formatting decisions it makes are problematic at times.

Deus Rex
Mar 5, 2005

sarehu posted:

This is the best reason I have so far for why Go should not have generics: http://forums.somethingawful.com/showthread.php?threadid=3693703&pagenumber=2#post444927286

What does that have to do with generics?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply