<div dir="ltr"><div>Using a more idiomatic use of whitespace, isn't this just the difference between:</div><div><br></div><div>|    <span style="font-family:monospace">if (a > 50) print("50 more");</span><br></div><div><br></div><div>and</div><div><br></div><div>|    <span style="font-family:monospace">a > 50 ?. print("50 more");</span></div><div><br></div><div>That is, a two character difference for a new operator we can't use for something else (and that operator is highly recognisable as the 'null-safe navigation' operator in several languages - and proposed for Java way back in Java 6/7 days with Project Coin - or was it even earlier than that).<br></div><div><br></div><div>If teams want to shorten code in this form, can't they just change formatting policies to allow a single-branch, single-statement body, if-statement to occupy a single line?<br></div><div><br></div><div>--</div><div>Aaron Scott-Boddendijk<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 24, 2022 at 6:29 AM sankar singh <<a href="mailto:sankar.singu@gmail.com">sankar.singu@gmail.com</a>> wrote:<br></div><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">Hi Team,<div><br></div><div>We are using ternary operator</div><div><br></div><div><div><div>Can we use single conditional code like the below.</div><div><br></div><div><b><font size="4">if (a>50)</font></b></div><div><b><font size="4">   print("50 more")</font></b></div><div><b><font size="4"><br></font></b></div><div><b><font size="4">a>50?.  print("50 more")</font></b></div><div><br></div><div><br></div>-- <br><div dir="ltr"> <br>regards,<br><br>Shankar.S<br></div></div></div></div>
</blockquote></div>