jamespwilliams

Joined 6 years ago

Karma
2,548
Submissions
273
Member since
Aug 15
https://github.com/jamespwilliams

Submissions != endorsements

View on Hacker News

Recent submissions

Comment · 2 years ago
https://go-review.googlesource.com/c/go/+/576015 this change to optimise errors.Is in the err == nil case was merged recently. It’s not included in the latest Go release, hence the stats here, but should end up in a release pretty soon I’d imagine.
Comment · 2 years ago
That err == nil check was added very recently and isn’t included in the latest Go release, which the author used in this article.
Comment · 2 years ago
And conversely, short domains like Google’s own g.co are less secure!
Comment · 2 years ago
Comment · 2 years ago
Can you spot the intentional bug in this commit?
Comment · 2 years ago
> Maybe it would be easier to have some kind of framework for compiler plugins that do extra checks. [...] But I haven't seen any language community do something like that. What am I missing?

Go has adopted a similar approach to this - they've made it fairly easy to write separate plugins that check stuff like this. The plugins aren't executed as part of the compiler though, they're standalone tools. For example, see golangci-lint, which bundles together a load of plugins of this kind.

Some of these plugins are shipped within the go command directly, as part of the "go vet" subcommand. (including a printf format check, which is similar to what's described in this post, i.e. it checks that arguments are of the correct type).

Comment · 2 years ago
> Now, listen. I wish I could continue here and end with “… and this is why ZSH does it that way!”

https://github.com/zsh-users/zsh/blob/47c7bc9b1493c7374f076b... has a comment about this behaviour, but no justification. I think it's just an optimization to save a little bit of time by not forking, and to avoid having the zsh process hanging around taking resources for no reason.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton