Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
That's like saying assembly suffices for everything, why bother with abstraction?
Maybe makes it easy to write null-safe code, I don't see why that's a bad thing. And it's far easier to compose than if statements, especially if you're following a monadic style where Maybe forms a very convenient monad. -
so in theory, a good thing, unless it was written by *that* guy at work, you know the one...
-
ojrask2915yRust has an Option<T> type. Super useful, and I hope PHP core had that as well. Same for Result<T, U>.
-
Hazarth95015ySame in Java, it has an Optional<>. And Kotlin is also null-safe by default. Even C++ has an optional<> template these days. It's funny to call it Maybe, but its a common approach.
Related Rants
Just found a 'Maybe' class that wraps an instance for null-safety. With arbitrary behaviour.
Like a good ol' if was a scary thing
rant
null
if
shitty code
wrapper