49 karma · joined January 27, 2022
E.g. if I rebase some stacked branches then I want to undo it, with git I would reset each branch separately.
With jj you can timetravel the state of the repo in ine command
Ick1 result1 = potentiallyNull1();
Ick2 result2 = (result1 == null) ? null : potentiallyNull2(result1);
Ick3 result3 = (result2 == null) ? null : potentiallyNull3(result2);
vs Ick3 result3 = potentiallyNone1()
.flatMap(potentiallyNone2)
.flatMap(potentiallyNone3);
You could maybe move the null check inside the method in the former and it cleans it up a bit, but in the latter you can have methods that are explicitly marked as taking NonNull in their type signature which is nice.Perhaps I'm stretching the author's message, but at least I believe that the argument extends to all engineering conclusions. The author's call is that we acknowledge this subjective side.
Essentially, true engineering is about tradeoffs, there is no X that is objectively better than Y in all circumstances and contexts.
Left Leaning Red Black Trees Considerer Harmful: https://www.read.seas.harvard.edu/~kohler/notes/llrb.html
https://blog.codinghorror.com/web-discussions-flat-by-design...
At this point though, I think I honestly would prefer setters/getters.
struct MyClassPublic {
int x;
int y;
...
}
/* using it */
MyClass *myclass = myclass_create();
((MyClassPublic *)myclass)->x = 5;