Would be nice to support optional chaining, similar to JS. However, not sure if this is realistically viable considering the following complications:
Similar to operator assignments, optional chaining should not cause duplicate indexing to occur. For example:
print(my_expensive_function()?.my_optional_field)
The above code should only cause my_expensive_function to be called once. However, this may be quite difficult to do without incurring the overhead of an IIFE.
Would be nice to support optional chaining, similar to JS. However, not sure if this is realistically viable considering the following complications:
Similar to operator assignments, optional chaining should not cause duplicate indexing to occur. For example:
The above code should only cause
my_expensive_function
to be called once. However, this may be quite difficult to do without incurring the overhead of an IIFE.