News for hackers. Stuff that matters.
Re:Ask HN: What's the big deal with Go (Golang)? by cookiengineer on Thursday October 12, 2023 @01:38AM (#37853784)
From a pentester's perspective:

- CGo as a bridge between C and Go/VM world

- go:embed and go:generate for bindings, preshipped modules and assets

- 100% static binary as simple as an environment flag

- golang compiler is self hosted in go, which means you can make malware that can make malware :)

- pretty much all operating systems or as close to it, without any host system requirement and neither dozens of compiler environments with outdated SDK headers

- go assembler, which ironically makes this the best language for malware development

- batteries included language, use golang.org/x and that is almost always anything you will ever need

- can be typesafe but also not ("unsafe" package), which is important for exploit development

- doesn't need 2 Million string abstractions (just kidding, rusties)

From a software architect's perspective:

- VERY opinionated language design, you have to set aside your personal opinion to be able to like it

- generics took a long while, now they're here but you still have to implement all yourself. Not there yet with forEach, map, reduce etc.

- Uppercase for export was a dumb decision, because serializer specific annotations to map field names is an effect for that cause

- standard formatting guidelines, use go fmt, don't use semicolons because nobody does

- for loops everywhere, which can be bad for readability compared to forEach() scopes

There are no comments on this comment yet.