BatmanAoD

joined 1 year ago
[–] [email protected] 3 points 3 months ago (3 children)

I should have stressed the "opinion" part of "IMO". What I mean is that, when I read this, it struck me immediately as being exactly correct: https://joeduffyblog.com/2016/02/07/the-error-model/

[–] [email protected] 5 points 3 months ago (5 children)

The problem is that most languages with exceptions treat that as the idiomatic error mechanism. So checked exceptions were invented, essentially, to do exactly what you say: add the exception type to the function signature.

Having separate errors-as-return-values and unwinding-for-emergencies is a much more recent trend (and, IMO, an obviously good development).

[–] [email protected] 5 points 3 months ago

Yes. True. But Uncle Bob literally complains about non-nullable types in the linked blog post.

I'm not saying testing isn't important. I'm saying that hand-written unit tests are not the end-all be-all of software quality, and that Uncle Bob explicitly believes they are.

[–] [email protected] 5 points 3 months ago

The blog post? Yeah, that was the moment I lost most of my remaining respect for his tech opinions.

[–] [email protected] 43 points 3 months ago* (last edited 3 months ago) (23 children)

Unlikely, unless his view has changed substantially in the last seven years: https://blog.cleancoder.com/uncle-bob/2017/01/11/TheDarkPath.html

I think his views on how to achieve good quality software are nearly antithetical to the goals of Rust. As expressed in that blog post and in Clean Code, he thinks better discipline, particularly through writing lots and lots of explicit unit tests, is the only path to reliable software. Rust, on the other hand, is very much designed to make the compiler and other tooling bear as much of the burden of correctness as possible.

(To be clear, I realize you're kidding. But I do think it's important to know just how at odds the TDD philosophy is from the "safe languages" philosophy.)

[–] [email protected] 3 points 3 months ago

It's not so much a problem of there being things you "can't do" in other shells or older Bash, as that it breaks existing shell scripts, which is frustrating.

[–] [email protected] 1 points 3 months ago (1 children)

Just because it doesn't matter for most users doesn't mean it isn't a real limitation. I acknowledged as much in my original comment.

[–] [email protected] 0 points 3 months ago (3 children)

Did you read the linked Q&A?

What do you get if you run /bin/bash --version?

[–] [email protected] 36 points 3 months ago* (last edited 3 months ago) (17 children)

You get admin privileges on MacOS like a big boy. You can use bash or zsh commands in Terminal all you want.

Cool. So try updating to a version of Bash from the last 15 years, because the pre-installed one is Bash 3, because Bash 4 and 5 are under the GPLv3 license, which Apple won't comply with.

...ah, no, you can't update the pre-installed Bash, because it's on a section of the file system that is read-only even with admin access. You can install Bash 5 as a separate shell, and use that as your default terminal shell, but any scripts written with the standard #!/bin/bash instead of the more flexible #!/usr/bin/env bash will still use Bash 3.

This "handholding" (or really, a safety net) is arguably a good thing, or at least a positive tradeoff; but you can't claim it doesn't exist.

[–] [email protected] 17 points 3 months ago

rm - rf is the only version that makes sense, since the only reason to delete and re-clone is to recover from an unexpected .git/ state, and git rm won't remove that.

[–] [email protected] 5 points 4 months ago (2 children)

Sorry, why would you be "boned" if you have UTC time? Are you thinking of the case where the desired behavior is to preserve the local time, rather than the absolute time?

view more: ‹ prev next ›