if fooOK
if barOK {
if bazOK {
// do something
}
}
}
can be written as: guard fooOK else { return }
guard barOK else { return }
guard bazOK else { return }
// do something
Obviously there are other options (like writing a negated if), but sometimes guard is more readable. It's a style thing. guard let foo = someOptional else { return }
print(foo);
This is useful enough that Rust copied it in the form of 'let ... else {}' statements (but did not bring over boolean guard statements). enum Foo {
A(bool),
B
}
Variant A uses the valid bool values 0 and 1, whereas variant B uses some other bit pattern (maybe 2). enum Foo {
A(bool),
B(bool)
}
...because bool always has bit patterns 0 and 1, so it's not possible for an invalid value for A's fields to hold a valid value for B's fields.
The videos are heavily edited with many cuts. So, I'd guess the production process is "have him talk for an hour, then edit it down to a 10 minute YouTube video".
> In any event, Rick Beato seems like a normal human being, albeit a somewhat goofy dad-rock oldie. 12Tone comes across as an aspie weirdo. I'd rather have more of the former.
And that's...kind of the point I'm making? The amount of effort put into the content of Beato's videos is quite low, with probably a couple hours at most of time put into research, coming up with talking points, and recording. But a lot of effort is spent on production, in order to make content that feels relatable and punchy and palatable to a mass market. It's junk food, and junk food sells well.