News for hackers. Stuff that matters.
Re:What makes you enjoy Go lang? by cookiengineer on Tuesday April 25, 2023 @12:40AM (#35696549)
I would want to add to the above list:

- I love golang's build toolchain. Cross-compilation is just an environment variable.

- I love its go:embed functionality, as it removes the necessity of crappy squashfs based solutions, and allows embedding all assets e.g. a webserver/website needs.

- What I both like and dislike: Marshalling. It can be a joy to use marshalling when you are in control of the data structures, but it also can be PITA when you have to parse external JSON data structures that do not conform to the same types.

Something like parsing a package.json, where fields can be e.g. a string, an array of objects or a single object is real pain to do in golang because it requires to use the reflections API.

There are no comments on this comment yet.