> The problem with leaving it undefined is that `inv` has to check whether `pinv` has been initialized yet. Is that even possible if I leave it undefined in the constructor?

Yes, with `isdefined`: if `p` is ` ScaledPlan`, then you can query whether `p.pinv` is initialized with `isdefined(p, :pinv)`.