HNHacker News
TopNewBestAskShowJobs

jtasdlfj234

48 karma · joined January 2, 2024

submissionscomments
jtasdlfj234··on Async File IO
Virtual Threads, under the hood, cooperatively yield at IO boundaries (on supported APIs)
jtasdlfj234··on Don't pass structs bigger than 16 bytes on AMD64
Please prove me wrong on these points. My current belief and understanding is that:

1. `foo(T)` indicates polymorphic over both `T::T(const T&)` and `T::T(T&&)`. This gives you benefits of both pass-by-move (using `std::move` as needed), or copy.

2. Usage of `foo(T&&)` signals code-smell or an anti-pattern as `foo(T)` should be used instead unless it is perfecting forwarding / universal reference `template <typename T> foo(T&&)`.

jtasdlfj234··on Go: What we got right, what we got wrong
Okay, circling back here. So your position is that nil safety would reduce the value of Go's "getting things done"? As someone who uses Go in production, I don't agree at all.
jtasdlfj234··on Go: What we got right, what we got wrong
Dart evolved into a nice language with null-safety and exhaustive patterns.

Hopefully in Go 3, we could see these features added as well.

jtasdlfj234··on Go: What we got right, what we got wrong
> It's so derpy.

That's why I love it.

jtasdlfj234··on Go: What we got right, what we got wrong
Excellently described.

I'd love to see a resource that highlights these all on a table across programming languages as well as the associated strengths and weaknesses of such threading & concurrency models.

Perhaps a ByteByteGo graphic, if you will.

jtasdlfj234··on Go: What we got right, what we got wrong
I would have more respect if they at least admitted to the flawed type system but instead say it is not a problem. It is disappointing to see past mistakes repeated in a new programming language. Even the Java language creator was humble enough to admit fault for the null pointer problem. The Go devs do not have such humility.

https://github.com/uber-go/nilaway