-
Per Hedbor authored
?-> can be used to index something that is either indexable or null. ?: is an alias for || Very useful for things like: C c = a && a->b && a->b->c; which can now be rewritten as C c = a?->b?->c; The code in language.yacc also supports ?. and ?[], but there are syntax conflicts with ?: for those: ?. conflicts with expr?.Module:... ?[] conflicts wtih expr?[softcast]:... ?: was added mostly to be compatible with other 'modern' C-like languages.
Per Hedbor authored?-> can be used to index something that is either indexable or null. ?: is an alias for || Very useful for things like: C c = a && a->b && a->b->c; which can now be rewritten as C c = a?->b?->c; The code in language.yacc also supports ?. and ?[], but there are syntax conflicts with ?: for those: ?. conflicts with expr?.Module:... ?[] conflicts wtih expr?[softcast]:... ?: was added mostly to be compatible with other 'modern' C-like languages.