Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
9rx
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
50 ms
·
391.
▲
by
9rx
7mo ago
> how much economically extractable oil is available on earth is actually a fundamental property of the universe. Affordability requires something to exist. Once all the oil is used up it won't be affordability that prevents you f
392.
▲
by
9rx
7mo ago
> It is not purely a social construct. What else is involved? Despite the inane ramblings of the parent comment, scarcity isn't actually a factor. Allocation occurs because of scarcity. Without scarcity, there is no such thing a
393.
▲
by
9rx
7mo ago
Absolutely. That's why it is best to stick to the already established definitions. Kay was quite explicit about what "object-oriented" meant when the term was uttered for the first time; including specifically calling out C++
394.
▲
by
9rx
7mo ago
> That can't exactly be true, because scarcity is a physical limit. Hence resource allocation. If there were no physical limit, there would be nothing in need of allocation. Allocation is intrinsically bound to scarcity. > If
395.
▲
by
9rx
7mo ago
Resource allocation is entirely a social construct. Not being afford something is a 'pretend' state that only exists because everyone agrees to go along with it. Even if a magical unicorn were to step in and start distributing res
396.
▲
by
9rx
7mo ago
> one part trying to find common ground for Java, Modula, C++ The primary common ground is that their functions have encapsulation, which is what separates it from functions without encapsulation (i.e. imperative programming). This alrea
397.
▲
by
9rx
7mo ago
Go is modern/faster Python. - It was explicitly intended to "feel dynamically-typed" - Tries to live by the zen of Python (more than Python itself!) - Was built during the time it was fashionable to use Python for the kinds o
398.
▲
by
9rx
7mo ago
Yes, of course you can call objc_msgSend or equivalent in Rust just as you can in C. But you are pushing the object-oriented model into a library. It is not native to the language.
399.
▲
by
9rx
7mo ago
Objective-C added OOP to C. C++ did not. C++ is neither an OO language nor a C superset.
400.
▲
by
9rx
7mo ago
I'd rather my colleagues (and past self) write Rocq. Rust is what you use when you'd rather spend time doing sales and marketing for Rust than building software.
401.
▲
by
9rx
7mo ago
> You're a human talking to other humans. Okay. Let's put that to the test. Describe my human features. What do I look like, sound like? > and my impression is that there's a sizable group of people who would have be
402.
▲
by
9rx
7mo ago
> This is exactly what I mean by needlessly provocative. This doesn't make sense. You might be mistakenly anthropomorphizing HN? > so of course they didn't solve what you're looking for. What I am looking for is irr
403.
▲
by
9rx
7mo ago
> but the compiler doesn't understand ... Right — While it does has sum types, it doesn't have some other features found in other languages. But, of course, if one wanted those features they would talk about those features. I
404.
▲
by
9rx
7mo ago
> I can tell you do I like nice things. You've identified a clear pain point that I agree with. If something can be better, why not make it better? "I am not able to think beyond the end of my nose, therefore we have to stop
405.
▲
by
9rx
7mo ago
> it’s anything in the world that someone might decide to write an isSumType function for. No. Notice the lowercase tag name. It is impossible for anyone else to add an arbitrary type to the closed set. Unless your argument is that sum
406.
▲
by
9rx
7mo ago
I am not sure how would you would simulate them. With enums and structs, I suppose? However, it also has true sum types: type SumType interface { isSumType() } type A string func (A) isSumType() type B int func (B) isS
407.
▲
by
9rx
7mo ago
Unless you are going back to CGI, web backends are systems.
408.
▲
by
9rx
7mo ago
Go does have sum types — but the syntax is awkward and a bit transparent, so many don't recognize it as being there, and those that do don't love using it.
409.
▲
by
9rx
7mo ago
> there's not nearly as many cases where someone needs to repeat `if x > y { return x }` a bunch of times In my evaluating of a fairly large codebase, if err != nil makes up a small percentage of all if statements. I think you
410.
▲
by
9rx
7mo ago
> if err != nil is verbose and distracting and happens a lot. if err != nil is no more or less verbose than if x > y. You may have a point that Go could do branching better in general, but that isn't about errors specifically.
411.
▲
by
9rx
7mo ago
I'm not. If you are, well, I guess you can't control other people.
412.
▲
by
9rx
7mo ago
> I agree go’s error handling feels a bit clunky It should be the same handling as all other types. If it feels clunkier than any other type, you've not found a good design yet. Keep trying new ideas.
413.
▲
by
9rx
7mo ago
> After a decade of writing Go I still don’t have a good rule of thumb for when I should wrap an error with more info or return it as-is. When writing your tests: 1. Ensure all error cases are identifiable to the caller — i.e. using er
414.
▲
by
9rx
7mo ago
You don't, hence why it pays to act smart.
415.
▲
by
9rx
7mo ago
> A compiler is deterministic. Not usually they aren't. They can be made to be, but it requires extra effort and tradeoffs. Hence why there is a lot of work put into reproducible builds — something you would get for free if compil
416.
▲
by
9rx
7mo ago
> Animal agriculture is around 15% of global emissions The majority of which is methane, which only has a 7-12 year life. Which means — unless for some reason you started eating way more animals than you did yesterday — that your emiss
417.
▲
by
9rx
7mo ago
> - Climate change is causing increasingly worse turbulence for airplanes Cutting out air travel is the single most accessible and impactful thing an individual can do with respect to climate change. You can stop turbulence from gettin
418.
▲
by
9rx
7mo ago
If you can press a button to understand what is going on, "it’s possible to overuse" most definitely applies. Dependency injection, as the name implies, is for dealing with dependencies — things that you cannot observe until run
419.
▲
by
9rx
8mo ago
> I have never seen fuzzing being done as part of a documented process in a project I worked in Fuzzing, while useful in the right places, is a bit niche. Its close cousin, property-based testing, is something that is ideally seen ofte
420.
▲
by
9rx
8mo ago
> I have never seen this practice formalized though Isn't that what is oft known as mutation testing? It is formalized to the point that we have automation to do the mutation for you automatically.
More ›