----- Mail original ----- > De: "Brian Goetz" <[email protected]> > À: "daniel smith" <[email protected]> > Cc: "Remi Forax" <[email protected]>, "amber-spec-experts" > <[email protected]> > Envoyé: Dimanche 6 Septembre 2020 18:53:36 > Objet: Re: [pattern-switch] Opting into totality
>> So I appreciate the brainstorming, but personally don't really see a problem >> that needs solving here. (Other than the syntax bikeshed.) > > Agreed, it was worth poking around the corners with a flashlight, but > the exploration brought me back to this point too. (If we even need it > at all.) > > Some of the motivation for this exercise has been that some people feel > uncomfortable at inferred totality. But, there's a good chance that > this discomfort is temporary -- this happens every time any sort of > implicitness is added to the language. (People freaked out about var > at first too.) at least for me, frame it like that doesn't help, the issue is accidental totality (or accidental non-totality) in a switch statement no problem with neither inferred totality nor with the switch expression. and to refine the question of this thread, i don't think we need to opt in to full totality, what is needed it an opt in to optimistic totality, adding a default or a case var x is enough otherwise. Rémi
