<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><br></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Pedro Lamarão" <pedro.lamarao@prodist.com.br><br><b>To: </b>"Kevin Bourrillion" <kevinb@google.com><br><b>Cc: </b>"Per-Ake Minborg" <per-ake.minborg@oracle.com>, "Remi Forax" <forax@univ-mlv.fr>, "Angelos Bimpoudis" <angelos.bimpoudis@oracle.com>, "amber-dev" <amber-dev@openjdk.org><br><b>Sent: </b>Thursday, January 26, 2023 10:09:43 PM<br><b>Subject: </b>Re: Draft JEP on Primitive types in patterns, instanceof, and switch<br></blockquote></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><div dir="ltr">Em qui., 26 de jan. de 2023 às 17:55, Kevin Bourrillion <<a href="mailto:kevinb@google.com" target="_blank">kevinb@google.com</a>> escreveu:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Depending on float equality is *dangerous*, but doesn't completely lack valid use cases.</div></blockquote><br><div>With some kind of epsilon predicate, this should become more useful.</div></div></div></blockquote><div><br></div><div>I think you will have to wait for the introduction of named patterns for this one, something like<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>  case Double.around(10.0, EPSILON)(double d) -> ... <br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>With the mention that this is obviously not the real syntax but a snippet of code to help to drive the discussion.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><div class="gmail_quote"><div> </div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Pedro Lamarão</div></div></div></div></blockquote><div><br></div><div>regards,<br data-mce-bogus="1"></div><div>Rémi<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div></div></div></body></html>