top | item 32159946

(no title)

gmalette | 3 years ago

That’s without even mentioning the footguns available in @@count

Jez!

discuss

order

jez|3 years ago

Ah sure, this alternate implementation assumes that the BlogPost class is final and never subclassed.

If you plan to subclass BlogPost, the translation is not identical, as the alternate implementation would not keep track of a global count of posts across all subclasses, only of `BlogPost` instances exactly.

gmalette|3 years ago

I saw you closed my ticket on sorbet for generics + sealed + exhaustiveness, that’ll allow some very welcome code cleanup!

gmalette|3 years ago

Depends who accessed it first ;)