Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
masklinn
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
31 ms
·
841.
▲
by
masklinn
1y ago
Yes, I know that, but the argument (which, again, I called dubious) is that in both cases it's much easier to do just e.g. fn foo() -> Result<()> { let data = std::fs::read("/some/file")?; &
842.
▲
by
masklinn
1y ago
The saddest part is that Go's designers decided to use MRV but pretty much just as bad tuples: as far as I can tell the only thing Go uses MRV for which tuple wouldn't be better as is post-updating named return values, and you cou
843.
▲
by
masklinn
1y ago
> I'm certainly open to discussion That is certainly not how your comment comes across.
844.
▲
by
masklinn
1y ago
> My argument is that they are not conceptually different. Your argument is nonsensical on its face, it could not be a more different way to compose types. > The implementation is different It's also largely irrelevant, the comme
845.
▲
by
masklinn
1y ago
Then I fail to see the point, that is trivial to lint, just enable the exhauststruct checker.
846.
▲
by
masklinn
1y ago
1. That is a global static relationship rather than a local one dynamic one, which is the sense in which Go users use wrapping. 2. Idiomatic go type erases errors, so you're converting from `error` to `error`, hence type-directed conve
847.
▲
by
masklinn
1y ago
> I don’t see how it breaks anything if it’s opt-in? Zero values are a fundamental, non-optional, "feature" of Go. > But if you’d rather force an explicit value to be supplied, what’s the harm? What happens if you use the fu
848.
▲
by
masklinn
1y ago
> It’s opt-in like generics, so I don’t see why it would be controversial to anyone? It "breaks" the language in fundamental ways — much more fundamental than syntactic sugar for error handling — by making zero values and thus
849.
▲
by
masklinn
1y ago
> But I fail to see how having convenience equates to ignoring the error. The convenience of writing `?` means nobody will bother wrapping errors anymore. Is what I understand of this extremely dubious argument. Since you could just desi
850.
▲
by
masklinn
1y ago
> they can’t add them because of their bizarre insistence that every type has to have a designated zero value. Nothing prevents adding union types with a zero value. Sure it sucks, but so do universal zero values in pretty much every oth
851.
▲
by
masklinn
1y ago
> What would Rust's "From" look like, for example? Idiomatic Go type-erases error types into `error`, when there is even a known type in the first place. Thus `From` is not a consideration, because the only `From` you need
852.
▲
by
masklinn
1y ago
This is just sad. Neither of your supports have anything to do with how dismal Go's error handling is, and neither would be worsened in any way by making it better. If anything they would be improved.
853.
▲
by
masklinn
1y ago
This is covered by the “ergonomics” section of TFA: > With custom error structs however, it's a lot of writing to create your own error type and thus it becomes more of a burden to encourage your team members to do this. Because you
854.
▲
by
masklinn
1y ago
> This message shows at a quick glance which participant, which database selection, and which integer value where used when the call failed. And it's completely useless for looking up the errors linked to a participant in an aggrega
855.
▲
by
masklinn
1y ago
> The world should have learned what a great presentation is and what presentation software should be like. The underlying difference can not be fixed by software, because software can't make you care about or value things: Jobs saw
856.
▲
by
masklinn
1y ago
It's especially dumb for Java, because Iterator could just have been a subtype of Iterable. That's basically what Python does, the iterator protocol requires also being an iterable[0]. And Rust just blanket implements IntoIterator
857.
▲
by
masklinn
1y ago
It's more between repeatable iterables and one-shot iterables (of which iterators are a subset, as iterators are iterable). For instance a file is an iterable, but (unless it's seekable and you rewind it) it'll only let you i
858.
▲
by
masklinn
1y ago
Not only that, but now that Go has iterators if you need this in several locations the logic of the original can easily be encapsulated in an iterator with a few relevant tunable knobs, and then you just write something like: for rang
859.
▲
by
masklinn
1y ago
> Zuckerberg saw them coming though [...] even Bezos saw it coming, that why Amazon bought Twitch. Which pertains to my reply... how? > Musk saw it coming with Twatter Musk saw nothing coming. He bought twitter in 2022 after getting
860.
▲
by
masklinn
1y ago
> That's an orthogonal issue to me. IMHO, modern Google never really cared about social media platforms because it never really understood them. Caring (or at least wanting in) and not understanding are perfectly compatible. I know
861.
▲
by
masklinn
1y ago
An Erlang process is a userland construct, but unlike “green threads” (e.g. goroutine, tasks, …) they have little to no shared memory, and the language is built around immutable values. Erlang’s “let it crash” philosophy is based around su
862.
▲
by
masklinn
1y ago
> swapping isn't feasible compared to moving. You would still want to remove most items from a capsule when being lifted by crane. Eh. If it had caught up it’s pretty reasonable that capsule design would have supported such a use ca
863.
▲
by
masklinn
1y ago
> This article seems in a similar genre to the breathless advice to remain inside in Britain when the outside temperature might get above 27C / 81F, otherwise known as a not-particularly-warm spring day in much of the US in most yea
864.
▲
by
masklinn
1y ago
The tower was ultimately demolished in 2022, though the capsules were removed first and two dozen are preserved. FWIW even ignoring the issue with maintenance of the commons, the capsules were originally designed with a 25 years lifespan, b
865.
▲
by
masklinn
1y ago
REST is a design principle, not a protocol. As such you can make a REST system discoverable via e.g. external schemas (commonly OpenAPI) or self-documentation but there is no guarantee that either exists, and while the latter is intrinsic t
866.
▲
by
masklinn
1y ago
> Here in Sweden, a carton of 10 × 500 mg is the most you can find without a subscription. (Boxes of twice that amount is supposed to exists but I've never seen it) That ain't much, I don't think I've seen boxes with
867.
▲
by
masklinn
1y ago
That’s far from unheard of in RPC protocols? E.g. the system namespace of xml-rpc.
868.
▲
by
masklinn
1y ago
1000mg is readily available around here, and although 500s are splittable you’ll find the odd 200~250 (mostly for children I assume).
869.
▲
by
masklinn
1y ago
Also some of the introspection stops working e.g. vars(). If you're using dataclasses it's less of an issue because dataclasses.asdict.
870.
▲
by
masklinn
1y ago
> One is better than none. Not necessarily. An inline cache is cheap but it's not free, even less so when it also comes with the expense of moving Class#new from C to Ruby. It's probably not worth speeding up the 1% at the expe
More ›