Yeah how we handle it isn't the question, why we a...
# getting-started
t
Yeah how we handle it isn't the question, why we allow it in the first place is what I'm curious about. If we can't determine via the type-system that a collection cannot be empty, then you can't tell me
first()
will always return something of type
Login
. Though the fact that it throws a
NoSuchElementException
is a huge hint of course, and if kotlin required the
throws
keyword on methods, then this would be solved