Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kaba0
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
34 ms
·
451.
▲
by
kaba0
2y ago
I always feel this comparison is a fallacy. Assembly is also perfectly simple and easy to follow, like each instruction is trivial. Yet you will fail to grasp the whole, as “you are zoomed in too close”. I feel go has a good scale for many
452.
▲
by
kaba0
2y ago
Well, you are comparing the tooling of haskell and go. Of course in this comparison the difference will be stark, but there are plenty of languages that are sanely expressive, unlike go, and has decent tooling around it, like java, c#, perh
453.
▲
by
kaba0
2y ago
Go pretty much uses a global errno, it’s literally analogous, and is a terrible language from an error handling perspective, that failed to learn anything since C.
454.
▲
by
kaba0
2y ago
> I don't understand what this means. If you wrap an exception and throw it, how has your function become responsible for the failure? That’s a declaration that this specific kind of problem (say, an IOException) can be handled as t
455.
▲
by
kaba0
2y ago
Thanks for the swift pointer, I’m not too familiar with that language. As for the more formalized version, effect types come into the picture, that let a function be parametric in how it handles its functional parameters. E.g. a `map` could
456.
▲
by
kaba0
2y ago
Heh? Yeah, and a C FFI exposed Rust function will also not care about, well, anything, let alone whether you handle the error case or not. I don’t see your point. Reflection is not the primary way of accessing methods, it’s used similarishl
457.
▲
by
kaba0
2y ago
The exact same way as in case of a checked exception.
458.
▲
by
kaba0
2y ago
I never really understood this “exceptions are non-local” stuff. They are basically the same as the sum-typed approach, with sane defaults. They are just “early” returns, that go to the callee, and either go to a local handler logic, or jus
459.
▲
by
kaba0
2y ago
Java is perfectly capable of expressing this thought, it has sum types, so the Result-type road is absolutely available to it. (Optional<T>=Maybe T is part of the JDK even) Although, it might not optimize as well, as this is not commo
460.
▲
by
kaba0
2y ago
Checked exceptions are only hated because java historically hasn’t provided enough syntactic sugar for it, basing it on inheritance is not the best decision and due to it being sort of outside java’s general type system. (Note: Java is thin
461.
▲
by
kaba0
2y ago
Libertarians are not known for their strong logical arguments.
462.
▲
by
kaba0
2y ago
I think the similarity is more like a mathematical/structural one, and doesn’t hold much water in a pragmatic sense. The possible error conditions for a network call are just insanely bigger than of a function call. Also, Smalltalk and
463.
▲
by
kaba0
2y ago
> OOP intentionally turns all software into a distributed system OOP does have a message-passing version, but even though the coiner of the term prefers this version, no one in the industry used it that way. The industry settled on meth
464.
▲
by
kaba0
2y ago
It’s insecure if done by your average full stack developer, that barely passed high school math. That’s why the usual mantra. It’s waaay different when done by math experts specialized in this topic, as is the case with telegram.
465.
▲
by
kaba0
2y ago
“Rolling your own crypto” is discouraged for programmers, not for field experts. It’s not your average joe’s first try at encryption writing a caesar cypher…
466.
▲
by
kaba0
2y ago
Nix, arch, basically everything packages it.
467.
▲
by
kaba0
2y ago
ORMs don’t mandate mapping the whole table either, you are free to create multiple entities per table/view.
468.
▲
by
kaba0
2y ago
> and started learning Go. Which does exactly what it says it does, with no magic Too little abstraction is just as bad as too much.
469.
▲
by
kaba0
2y ago
How do you map rows to objects? How do you insert into/update rows in your databases? These are the basic problems ORMs solve splendidly. They are for OLTP workloads, and have deliberate escape hatches to SQL (or some abstraction ove
470.
▲
by
kaba0
2y ago
I’m fairly sure the very maintainers of X11 knew more about the topic than you. And you get backwards compatibility with stuff like xwayland.
471.
▲
by
kaba0
2y ago
Well, while I do agree with you (I would even add performance-sensitive code to your list. Something like int[] applied at the correct places can do a lot), if we want to be absolutely nitpicky one can just use ByteBuffers over arrays for p
472.
▲
by
kaba0
2y ago
What does it have to do with java though? It’s a programming language, not general artificial intelligence. If you wrote errors that suck, and then didn’t bother encapsulating it in some sane form before it hits the user, it’s entirely on
473.
▲
by
kaba0
2y ago
This is solved through generics. List<T> will be invariant.
474.
▲
by
kaba0
2y ago
> I've recently learned that it's possible to write such abominations in C++, which is equally bad It’s not only possible, that’s where all this stuff originates from. Gang of 4 has examples in C++ for a reason.
475.
▲
by
kaba0
2y ago
I would like to add though that there is a big difference between a language-specific build tool that pretty much can’t build anything else and will bleed out at the first sight of another language in the project, and something like Gradl
476.
▲
by
kaba0
2y ago
To be honest, that over-architecture everything stuff came from even earlier with C++, that many people forget. Java was just a valid target to many programs that were previously written in C++, and some of that mindset stuck. I would argue
477.
▲
by
kaba0
2y ago
Java’s errors are amongst the best in my experience. Do you prefer Python’s much more esoteric stack traces, or Go’s one liner zero information spam, or the traditional “SegFault”? Like honestly, which ecosystem has better exceptions/e
478.
▲
by
kaba0
2y ago
Until the “wrong” ambulance comes to your door.
479.
▲
by
kaba0
2y ago
I have been thinking about this program for a long time now, and one area I haven’t seen covered are references that work even across different versions of the same document (e.g. the book got a new version, but still has the same chapter m
480.
▲
by
kaba0
2y ago
It’s good that there is some progress, my only gripe is that Android/ios was in a better shape a decade ago.
More ›