4,454 karma · joined September 23, 2010
Yeah, and that means a bunch of them don't work properly. It's unrealistic to expect app developers to support that one version that each particular distro ships.
There is months worth of "pending" passes on my clipper card and neither some Clipper support number I called nor the poor guy in the booth at the local BART station could tell me how to activate them (and also not some people on Reddit and my public transit using friends, of course). It's obviously not done by using either BART or buses or SF Muni, or tagging the card against the insert-coin machines at the station, because, you know, I've done all of that a bunch of times since this started being an issue. Most of the pending passes expired by now. I'd be more upset about this if I had paid for them with actual money and not some employer based commute benefit since I haven't exactly commuted regularly since the pandemic started.
withFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r
is just a more general way of writing withFile :: FilePath -> IOMode -> (Handle -> IO Handle) -> IO Handle
;)I've also heard about the ResourceT monad transformer but as of right now I don't think I could explain what it does or judge how well it does it, maybe that's also a sufficient solution.
People have edge cases all the time! Failing gracefully in edge cases is a critical feature for anything that's so deeply wired into your life like a payment processor or a cloud account!
We've known about this for many years!! And yet we for many varied reasons choose to make use of services anyway!! That doesn't mean we shouldn't get to complain about those services and giving people shit for that is really weird!!
For example, in
pub fn read<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
for me it's really unpleasant that there is so much stuff between the function name and the names of the parameters. It's a bit nicer with already-a-Rust-feature where-clauses like pub fn read<P>(path: P) -> io::Result<Vec<u8>> where P: AsRef<Path> {
but if nothing else I think that makes a mess of the indentation if you linebreak anywhere in that line.C++ avoids this by just yanking all the extra bits at the very start of the declaration, so we could copy that (without going all the way into C++ caricature):
for<P: AsRef<Path>>
pub fn read(path: P) -> io::Result<Vec<u8>> {
This addresses my specific complaint, but is probably worse for other people. Who knows.As another example, the whole business with explicit Result types and the early-return question mark is basically isomorphic to checked exceptions, which may or may not be syntactically lighter/more pleasant. Would Rust enthusiasts prefer that? Probably not. Would it make the language more approachable to people coming from some Java ecosystem? Maybe? Would it be worth it? No idea.