logoalt Hacker News

therealdrag0yesterday at 3:37 AM9 repliesview on HN

Golang lack of support for basic stuff like this is quite annoying.


Replies

tptacekyesterday at 4:08 AM

What's the language you're thinking of that has more of these decisions fixed in the standard library? I know it's not Ruby, Python, Rust, or Javascript. Is it Java? I don't think this is something Elixir does better.

show 3 replies
serfyesterday at 3:41 AM

the idea of what 'batteries included' means has changed a lot in the past twenty years, and like most Go quirks , probably Google just didn't need <missing-things>.

show 2 replies
vbezhenaryesterday at 6:58 AM

UUID is just array of 16 bytes or two 64-bit ints. Generating UUIDv4 is like few lines of code. Is that a big deal? I don't think so.

show 4 replies
forestoyesterday at 5:54 PM

What stuff do you have in mind?

I was disappointed by Go's poor support for human-focused logging. The log module is so basic that one might as well just use Printf. The slog module technically offers a line-based handler, but getting a traditional format out of it is painful at best, it lacks features that are common elsewhere, and it's somehow significantly slower than the json handler. I can only guess that it was added as an afterthought, by someone who doesn't normally do that kind of logging.

To be fair, I suppose this might make sense if Go is intended only for enterprisey environments. I often do projects outside of those environments, though, so I ended up spending a lot of time on a side quest to build what I expected to be built-in.

I haven't explored enough of the stdlib yet to know what else that I might expect is not there. If you have a wish list, would you care to share it?

orangeistheyesterday at 7:27 AM

Go has one of the best stdlibs of any language. I'd go as far and say it's the #1 language where the stdlib is the most used for day to day programming. cut the bullshit

show 1 reply
p0w3n3dyesterday at 9:17 AM

It makes you look on GitHub for implementations, which later can be hijacked and used for malicious reasons

catlifeonmarsyesterday at 4:26 AM

What other basic stuff are you thinking of?

show 1 reply
zdwyesterday at 4:06 AM

Now do Javascript.

show 1 reply