galdor,
@galdor@emacs.ch avatar

Careful, do not use the url.URL type in structures if you expect to encode them in JSON. For some incredibly stupid reason, it will be serialized as a JSON object and not as the expected string representation. Forces you to use strings everywhere. So much for type safety…

louis,
@louis@emacs.ch avatar

@galdor Go's own types in the standard library annoyingly lack RFC-compatible JSON Un/Marshallers (same goes for time.Time). The issue is discussed for years and it doesn't look like there will be any change until Go 2, if it all.

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

This means, that everyone has to run their own JSON-enabled versions of url.URL, time.Time and so an, since types in Go cannot be extended.

galdor,
@galdor@emacs.ch avatar

@louis The Go standard library feels like it was not designed as a set of components working together and more like a collection of heterogenous utilities.

As for Ruby and Python, it is a demonstration of why a standard library should be kept separate from the core language and be allowed to change version after version instead of having its mistakes set in stone.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • GTA5RPClips
  • provamag3
  • ethstaker
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • tacticalgear
  • anitta
  • megavids
  • Leos
  • cisconetworking
  • JUstTest
  • lostlight
  • All magazines