@Aurélien Geron mentioned this in the other thread... I thought I'd pull it into another thread to avoid overloading that one (which proposed a more significant change).
a = { foo: 123, bar: 456 } # For asthetic reasons ...
a = { foo: 123, bar:? Ok(456) } # I prefer this
a = { foo: 123, bar ?: Ok(456) } # Over this
Jared Ramirez said:
i also found
:?more intuitive when originally working on this, but i think Richard preferred?:because it’s a more common operator in other languages! (the elvis operator i think it is called)
I think I found the issue with my proposal...
# usage
{ field: 0.0 }
{ optional?: 0.0 }
{ default: 0.0 }
When you use it should the ? sit with the field identifier, or would it be even more strange.
I would summaries by saying I think the current approach is nicer in the case where we have no type annotations.
Last updated: Sep 24 2026 at 15:59 UTC