Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
benrazdev
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
benrazdev
8mo ago
why does an RSS feed aggregator even need ads in the first place?
2.
▲
by
benrazdev
9mo ago
I'll never forget walking through a tech store and seeing a HP printer that advertised itself as being "AI-powered". I don't know how you advertise a printer to make it exciting to customers but this is just ridiculous.
3.
▲
by
benrazdev
9mo ago
My best guess is that the font I am using (WOFF2 variable font) might be tripping up the browser.
4.
▲
by
benrazdev
9mo ago
I agree with your point in general, but I would challenge the idea that tuples aren't something that is intuitive to explain (even in less than 30 seconds). Perhaps it's difficult to explain why tuples and not lists, but that&#x
5.
▲
by
benrazdev
9mo ago
Its not really a matter of logic, I guess. Writing `pub` is personally more annoying to me than writing `if err != nil`. I understand that most people don't like how capitalization determines visibility, but I think it actually makes s
6.
▲
by
benrazdev
9mo ago
I can't speak for other Rust programmers but I can speak for myself. I obviously enjoy programming Rust and I like many of the choices it made, but I am well aware of the tradeoffs Rust has made and I understand why other languages cho
7.
▲
by
benrazdev
9mo ago
Technically, with generics, you could get a Result that is almost as good as Rust, but it is unidiomatic and awkward to write: type Result[T, E any] struct { Val T Err E IsErr bool } type Payload
8.
▲
by
benrazdev
9mo ago
>that is, all the information that would be present in a typical Rust error handling scenario as well --- is encoded in the type tree of the errors. it's only present when you downcast though?
9.
▲
by
benrazdev
9mo ago
From what the comments are saying I think you downcast with `errors.As` and then work on the underlying error type. But I don't know for sure.
10.
▲
by
benrazdev
9mo ago
>No enums? [...] We're stuck with magic numbers? In go you don't strictly need magic numbers because you can define constants: type Status int const ( IoProblem Status = iota // we start at zero and
11.
▲
by
benrazdev
9mo ago
Correct me if I am wrong, but does it not mean that they are type-erased though? The whole point of returning an interface is to perform type-erasure. If I have struct S { X int } func (s *S) Error() string { ... } but I return
12.
▲
by
benrazdev
9mo ago
>this is false. It's mostly false. Technically, if you use `fmt.Errorf`, then the caller can't get anything useful out of your errors. Types are promises. All the `error` interface promises is a string representation. I acknowl
13.
▲
by
benrazdev
9mo ago
>> difficulty of writing if err != nil >Literally the simplest way to deal with errors (cognitively and character wise). Since AI autocomplete entered the scene, typing this repetitive (for a reason) pattern became not a problem at
14.
▲
by
benrazdev
9mo ago
My understanding is that using `error` as a return type performs type erasure and that the only information given to the caller is the value of the `e.Error()` function. I now understand that this isn't the case.
15.
▲
by
benrazdev
9mo ago
Thanks for all of the comments! I want to clarify that I think very highly of Go as a language. I think it gets most things right. It's hard to introduce an abstraction into a language while still making sure that it's not abused.
16.
▲
An Honest Review of Go (2025)
(benraz.dev)
79 points
by
benrazdev
9mo ago
|
177 comments