You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In TS and Kotlin we can use ?. to access nullable fields on objects safely, and we can infinitely chain them
foo?.bar?.baz?.bax
We already have "error-guard" operator ? for ergonomic error handling, and there're some ideas for #746 where expressions like d[k] or l[i] return maybe (or Option, if we will go full rust-like in #751), also we have struct selectors syntax foo -> .bar -> .baz but what we don't have is ergonomic syntax for safe access to struct fields that are maybe/option if there's some nesting
type Foo struct {
bar maybe<struct {
baz maybe<struct{
bax maybe<int>
}>
}>
}
...
foo -> ?.bar?.baz?.bax -> match {
some -> println
none -> panic
}
The text was updated successfully, but these errors were encountered:
In TS and Kotlin we can use
?.
to access nullable fields on objects safely, and we can infinitely chain themWe already have "error-guard" operator
?
for ergonomic error handling, and there're some ideas for #746 where expressions liked[k]
orl[i]
returnmaybe
(orOption
, if we will go full rust-like in #751), also we have struct selectors syntaxfoo -> .bar -> .baz
but what we don't have is ergonomic syntax for safe access to struct fields that aremaybe/option
if there's some nestingThe text was updated successfully, but these errors were encountered: