462 karma · joined Jun 10, 2017 (9y ago) · 105 submissions
comment 2w ago · link · parent
I think encoding these things into a better type signature is the way to go. In Go and Lua, that means multiple return values like `success, result` or `result, err`. It's pretty clunky and verbose in both of those languages though and so my years of Lua made me instantly skeptical of Go doing the same thing.
Languages with cheap data-carrying enums like Rust are my favourite these days. No unhandled exceptions, super obvious where the failure is, and Rust has a lot of niceties for handling, mapping, and adding context to errors without a lot of runtime cost.
comment 3w ago · link · parent
This distinction is something that I think is actually handy about JavaScript, and distinguishing between 'null' and 'undefined' is sometimes useful for similar reasons.
comment 3mo ago · link · parent
If my friend is involved in an MLM scheme, I'm not going to trust them that I should buy NutriProteinShakeMax! I probably don't want them to tell me about it, ever!
comment 3mo ago · link · parent
Getting dependencies to build your app is definitely harder on Windows but the fact that you can just throw things in a folder for a binary distribution is unbeat!
comment 4mo ago · link · parent
If you hit a weird state in your program and it can _never_ be caused by memory corruption, you rule out a big bug space and no longer need to check the entire scope of your program. It’s similar to Rust’s unsafe blocks — it doesn’t really matter if they’re “more unsafe” than Zig because in Zig the scope of the unsafe is your entire program! Local reasoning is a huge part of what you buy into and I could never give that up if I didn’t have to.
comment 8mo ago · link · parent
These days I have a ZSA Moonlander. I adore it! I love how easy it is to program it without any software installed and it's been phenomenal to customize it to fit me perfectly.
I just changed all the switches out (in order to be quieter than my stock Cherry MX Brown switches) and replaced them with a set of Gazzew U4 switches. I'm _shocked_ at how far mechanical switches have come along since the days of Cherry dominance. They're super quiet and still have an awesome tactile feel!
comment 11mo ago · link · parent
I was very guilty of this as a young go-getter engineer! Why try to convince another team that something should be fixed if I can just paper over it?
comment 1y ago · link · parent
I had a loose grasp on variance then, didn't teach it well, and the team didn't understand it either. Among other things, it made even very early and unsound TypeScript pretty attractive just because we didn't have to annotate type variance!
I'm happy with Rust's solution here! Lifetimes and Fn types (especially together) seem to be the main place where variance comes up as a concept that you have to explicitly think about.
comment 3y ago · link · parent
I know that `wide`, `faster`, and `simdeez` are options for crates to do cross-platform SIMD in safe Rust. Eventually we'll have `std::simd`, but I don't know what the timeline is or what the blockers are.
comment 3y ago · link · parent
It seems like these rules are from the site's page load animation. You can see it if you refresh the page part way down. It's not a great way to achieve that effect.