3 ms·
> There are newbies posting every single day asking why "a.b.c" crashed in Swift. That is fair. And totally show why optionals are the right thing. Because obj
by mamcx 8y ago
> There are newbies posting every single day asking why "a.b.c" crashed in Swift.
That is fair. And totally show why optionals are the right thing. Because obj-c and others NOT have it the world suck MUCH more. That is why nulls are the billon dollar MISTAKE with capital letters.
The solution is to more and more languages, libraries and frameworks embrace the idea of algebraic types, not just declare "interfacing with old codebases with this huge MISTAKE is not nice, so why bother??".
What rust make nice is declare stuff as UNSAFE. I wish this was the case with swift and obj-c so make clear to everyone that you have entered the realm of nasty things and must be more careful...
- wool_gather 8y agoObjective-C has "optionals": every object pointer can be `nil`. What it gets right is that it doesn't implicitly treat a `nil` as a logic failure.
- mamcx 8y agoThat is not optionals, at all.