Raoul Duke
unread,Jun 13, 2022, 5:48:50 PM6/13/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pi...@googlegroups.com
even if you have maybe nicer syntax like "?" in various c-derived
languages like typescript or swift or kotlin, there are still plenty
of times, places, ways that you have to have the extra boilerplate of
checking for null. which makes it more annoying in a way when those
crop up.
pseudocode version of XCTest
assert_null( thingtocheck: Ref?, errormessage: String )
called like
assert_null( foo, foo.message )
sucks because
foo.message would have to be
foo?.message which still isn't of type String
so then it has to be
foo?.message ?? "fail"
which is confusing to say the least
even though the only time the code should use the message is when
dynamically foo itself is not null!!!!!!!!!!!!!!!! :-\