-
Notifications
You must be signed in to change notification settings - Fork 220
Open
Labels
small-featureA small feature which is relatively cheap to implement.A small feature which is relatively cheap to implement.
Description
It'll be a little enhancement but so much pleasant one :)
Kotlin and Swift has something like Safe casting with as?
operator. It gives an opportunity to casting with null
fallback if cast can't be performed:
void someFunction(dynamic arg) {
// we could has something like
final classVariable = (arg as? SomeClass)?.someValue;
// in place of
final classVariable = arg is SomeClass ? arg.someValue : null;
}
vovahost, jamesderlin, natebosch, l7ssha, marcin-adamczewski and 200 moreAhmadre, wjling, posxposy, 4BooM04, timnew and 14 moreisral
Metadata
Metadata
Assignees
Labels
small-featureA small feature which is relatively cheap to implement.A small feature which is relatively cheap to implement.