# wishful thinking...
using Dates;
leapDay = isleapyear(yr) ? Date(yr,2,29) : nothing
if ! leapDay
dow = dayofyear( leapDay )
... clean and concise (thought that was the point), but we get
leapDay = isleapyear(yr) ? Nullable{Date}( Date(yr,2,29) : Nullable{Date}()
if ! isnull( leapDay )
dow = dayofyear( get(leapDay) )
...
If I am dumb enough to forget to check for a null date, I deserve the
exception - the code would be wrong. Making me type two or three times as
many characters, obscuring what is actually going on, ... all to eliminate
NullPointerExceptions? I have to write exception free code anyway, so all
I have 'gained' is a lot of superfluous verbosity. I'm going to side with
salience over verbosity every time. The type safe argument just doesn't
sell me, sorry.