For sure, but as long as clickbait works they’ll keep doing it.
For sure, but as long as clickbait works they’ll keep doing it.
To be fair, “an entire x” does have markedly different connotation than “x”. The emphasis is that it’s, well, the entirety of x. It’s the difference between “i ate the cereal” and “i ate all the cereal”.
Honestly, it’s because a bunch of programs i used disappointed me (performance, functionality, [being a web app at all], etc.) and i figured it couldnt be that hard to do it better. In some cases i was right, in most i was wrong. As it turns out though, I really like programming so i guess i’m stuck here
I mean to be fair, those errors arent really meant for you (the end user) in the first place.
I’m not sure I understand your point about fall through having to be explicit
As far as i understand it, every switch statement requires a break
otherwise it’s a compiler error - which makes sense from the “fallthrough is a footgun” C perspective. But fallthrough isnt the implicit behavior in C# like it is in C - the absence of a break
wouldnt fall through, even if it wasnt a compiler error. Fallthrough only happens when you explicitly use goto
.
But break
is what you want 99% of the time, and fallthrough is explicit. So why does break
also need to be explicit? Why isnt it just the default behavior when there’s nothing at the end of the case?
It’s like saying “my hammer that’s on fire isnt safe, so you’re required to wear oven mitts when hammering” instead of just… producing a hammer that’s not on fire.
From what i saw on the internet, the justification (from MS) was literally “c programmers will be confused if they dont have to put breaks at the end”.
the ergonomics expected of modern languages.
As someone learning c# right now, can we get some of those “modern ergonomics” for switch statements 💀
I cant believe it works the way it does. “Fallthrough logic is a dumb footgun, so those have to be explicit rather than the default. But C programmers might get confused somehow, so break has to be explicit too”
I miss fallthrough logic in languages that dont have it, and the “goto case” feature is really sick but like… Cmon, there’s clearly a correct way here and it isnt “there is no default behavior”
Generators probably. It’s the one thing i genuinely miss about python when i work in rust.
Saying “non negotiable” doesnt actually hold up in small claims, nor against basic resistance in most cases.
Look up your local laws, in some places carpets must be replaced at the expense of the landlord every X years, or if there is any kind of damage (caused by regular wear and tear) that could be a trip hazard. Pictures from move-in, carpets not being replaced when you moved in, etc. all help your case.
Last place i lived, I spent 30 minutes arguing on the phone with my previous landlord over flooring and got my 700 dollars back. Turns out most of the time they only vaguely know the laws they’re quoting, so if you come with confidence, prep, and a willingness to take it to small claims, they’ll fold to save themselves the effort.
That depends on your definition of correct lmao. Rust explicitly counts utf-8 scalar values, because that’s the length of the raw bytes contained in the string. There are many times where that value is more useful than the grapheme count.
I think it was this issue. Looks like maybe it got fixed some time this year? Iunno, i’ll look into it at some point
Is pycharm’s semantic highlighting still kinda ass? That’s the biggest thing that stopped me from using it over vsc. As of like may this year i remember there still being active issue tracking for it.
Counterpoint, i didnt like the rust book at all (as an inexperienced self taught ~6 months to a year into learning python at the time). Programming Rust and Rust In Action were far better.
Seems you missed the last line
compiles to fast code
Obligatory shoutout to Qownnotes for being excellent, fully open source, and with owncloud integration.
15532 on-type format (, by adding closing ) automatically
Thank fucking god lmao. The PR specifically mentions the Some(
case too, which is exactly where i encounter this the most.
Overall very nice changes
You could say that about anything. Of course you have to learn something the first time and it’s “unintuitive” then. Intuition is literally an expectation based on prior experience.
Intuitive patterns exist in programming languages. For example, most conditionals are denoted with “if”, “else”, and “while”. You would find it intuitive if a new programming language adhered to that. You’d find it unintuitive if the conditionals were denoted with “dnwwkcoeo”, “wowpekg cneo”, and “coebemal”.
“Unintuitive” often suggests that there’s something wrong with the language in a global sense
I mean only if you consider “Intuition” to be some monolithic, static thing that’s also identical for everyone. Everyone has their own intuition, and their intuition changes over time. Intuition is akin to an opinion - it’s built up based on your own past experiences.
just because it doesn’t look like the last one you used — as if the choice to use (or not use) curly braces is natural and anything else is willfully perverse on the part of the language designer.
I don’t think it’s that deep. All people mean when they say it is that “[thing] defied my expectation/prior experience”. It’s like saying “sea food tastes bad”. There’s an implicit “to me” at the end, it’s obvious i’m not saying “sea food factually tastes bad, and anyone who says they like it is wrong or lying”.
Here’s the script. It’s nothing fancy, and iirc it only works for top level functions/classes. That means you still have to take care of attributes and methods which is a little annoying, but for simple stuff it should save a bit of time.
For downsides, i’d like to add that the lack of function overloading and default parameters can be really obnoxious and lead to [stupid ugly garbage].
A funny one i found in the standard library is in time::Duration
. Duration::as_nanos()
returns a u128, Duration::from_nanos()
only accepts a u64. That means you need to explicitly downcast and possibly lose data to make a Duration after any transformations you did.
They cant change from_nanos()
to accept u128 instead because that’s breaking since type casting upwards has to be explicit too (for some reason). The only solution then is to make a from_nanos_u128()
which is both ugly, and leaves the 64 bit variant hanging there like a vestigial limb.
Qownnotes
It’s a desktop app, but can sync with self-hosted cloud servers. It’s also literally just text/markdown files.