Dec. 17, 2021
5:08 a.m.
On Thu, Dec 16, 2021 at 10:30 AM S Pradeep Kumar <gohanpra@gmail.com> wrote:
Same unpopular opinion as Никита: `Union` can actually be better when there are more than two types.
I'm not convinced this is all that unpopular an opinion (and it's one I also share.) And if we're judging on popularity, I suspect that breaking existing code with a deprecation, even a relatively trivial one, is likely to be far more unpopular.
`Optional` can be better when there are other special operators.
I prefer `Optional` flat out. I find it more readable in general, even in the simple cases, and it's certainly far more explicit about the intent.