The rule of thumb should be:
- Is your task CPU bound? Put it in a thread pool.
- Is your task spending most of its time waiting (e.g. network call)? Use a coroutine
2,724 karma · joined May 30, 2016
The rule of thumb should be:
- Is your task CPU bound? Put it in a thread pool.
- Is your task spending most of its time waiting (e.g. network call)? Use a coroutine
Er... what?
He's known for forcing the name Gnu to be appended to Linux because of some wildly exaggerated claims of ownership.
We're talking about rms, not Linus.
Wait until your code base grows, your team grows to >10 developers, and you will understand what I mean.
Java (and preferably Kotlin) are a lot more serious about making sure your code is robust before it compiles.
In 1995, I booted Windows 95 for the first time and as soon as I saw it, I immediately thought "That's it, game over for the Amiga. Windows has won".
It looked gorgeous, was reasonably fast, featured preemptive multitasking (10 years after the Amiga...).
I sold my Amiga in the months that followed, with much sadness.
You might want to modernize your perception of it, holding on to 15 year old views is not a very smart move in the tech industry.
Windows 10 and 11 are a joy to use, and to develop. I used a Mac for 15 years and switched to Windows to develop 5 years ago, and now macOS looks extremely antiquated and creaky for development.
Since it made no sense to use, it became the way 286 and later processors used to indicate multibyte opcodes.
When a 286 is running the code, encountering a 0x0f means that the following opcode is multibyte, while on an 8088, all opcodes are single bytes.
Checked exceptions force you to do more work, but it's essential work to make your code more robust.
Replacing them with runtime exceptions gives you the illusion of clearer code, but all you have is actually code that is more likely to crash.
It's his language, obviously, but I strongly suspect that if this PR goes through, it will completely kill any kind of momentum that Zig has today and will most likely doom the language to obscurity.
Which would be a real shame.
Yes, in much the same way that no longer checking for error codes provides an easier coding experience.
But it makes your code more crashy.
Maybe saying it's "completely pointless. It literally serves no purpose" is a bit overly dramatic, don't you think?
You could have limited yourself to saying you don't personally like it because it breaks with tradition.
As opposed to most compiler articles, this one actually covers code generation for every section of its chapters, which is really great.
I also like that every chapter focuses on a specific feature and describes how to implement it end to end: lexical/syntactic parsing, AST, and x86_64 generation.
Great series!
But I'm sure you know better than them.
How about instead of using tradition to decide if something is beneficial or not, you just assess it on its value?
That's a terrible reason to justify... well, anything, really.
There is a difference for a language between "readable" and "understandable".
To me, languages that don't have type annotations (ideally with type inference) might look pleasing to the eye but they are a nightmare to maintain and modify because so much vital information is missing.
I coded in Java for 20+ years and then switched to Kotlin. Semicolons were gone, it was a breath of fresh air.
And then I learned Rust and I faced what I thought were two absolutely insurmountable obstacles: semicolons AND snake_case. I considered Rust ugly for these reasons and really dragged my feet. But I was curious about the language, so I perservered.
One week later, I wasn't noticing any of these any more. I still do think that semicolons are a manifestation of a language developer who favors their time over mine, but it's become more of a pet peeve than a deal breaker.
The human mind is wonderfully flexible.
The freedom of individuals clearly stops at illegal acts.
This books suffers a lot from this limitation, with figures sometimes appearing 5 pages before they are actually referenced in the text.
Is this serious?
Surely you realize that picking one of the most successful apps created this past decade is not the resounding endorsement you think it is.
So in D, `popFront()` not only returns... nothing (void) but then returns... an index?
No wonder nobody uses this language.
Java's getters and setters *are* properties. Just with more syntactic sugar than languages that natively support properties, but the semantic is exactly the same.
It's not an anti-pattern.
This is how Java provides the exact functionality that you describe as very important (field encapsulation). Because Java doesn't support properties, it needs to go through getters and setters.
As you point out, more modern languages support this functionality directly in the language with properties.
Textbook definition of "closed minded".