Switching on float/double/long
Guy Steele
guy.steele at oracle.com
Fri Dec 15 20:38:36 UTC 2017
> On Dec 13, 2017, at 7:51 PM, John Rose <john.r.rose at oracle.com> wrote:
> . . . the overarching principle I prefer for match is to ask the
> following polymorphic question: "Could a value just like this case
> expression have been assigned to that switch variable?" This, IMO,
> unwinds a lot of otherwise ad hoc special pleading. It does require
> some ad hoc definition of what "just like this" means, but the rest falls
> out of prior JLS semantics. Including the vexed questions which will
> be occurring to you, above, about Long vs. long vs. byte.
>
> — John
+1
—Guy
More information about the amber-spec-experts
mailing list