<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>"John Rose" <john.r.rose@oracle.com><br><b>To: </b>"Brian Goetz" <brian.goetz@oracle.com><br><b>Cc: </b>"amber-spec-experts" <amber-spec-experts@openjdk.java.net><br><b>Sent: </b>Wednesday, October 19, 2022 10:16:11 PM<br><b>Subject: </b>Re: Paving the on-ramp<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 style="font-family: sans-serif;"><div class="markdown" style="white-space: normal;">
<p dir="auto">On 19 Oct 2022, at 9:43, Brian Goetz wrote:</p>
</div><div class="plaintext" style="white-space: normal;"><blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; color: #777777;"><p dir="auto">The alternative is to view these as _implicitly named_ classes, where they have a name, just derived from the file system rather than the source code.</p>
</blockquote></div>
<div class="markdown" style="white-space: normal;">
<p dir="auto">I’d like to discourage this idea. We already have nameless classes with non-denotable names, and programmers know how to use them. We don’t really have implicitly-named classes. (Except maybe in a weak sense for certain well-defined bytecode names like <code style="margin: 0; padding: 0 0.4em; border-radius: 3px; background-color: #F7F7F7;">pkg/Foo$Bar</code>, for member classes which already have an explicit name <code style="margin: 0; padding: 0 0.4em; border-radius: 3px; background-color: #F7F7F7;">Foo.Bar</code>; arguably <code style="margin: 0; padding: 0 0.4em; border-radius: 3px; background-color: #F7F7F7;">Foo$Bar</code> is an implicit name. But it cannot appear in source.)</p></div></div></blockquote><div><br></div><div>It can appear in the source, '$' is a valid character for an identifier.<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 style="font-family: sans-serif;"><div class="markdown" style="white-space: normal;">
<p dir="auto">If we introduce a new way of naming (implicit names) we will have to roll out rules for mapping the name-precursor (a filename) to a name. This will have its own headaches, since different OSs have different alphabets and syntaxes, and none of those alphabets or syntaxes are fully compatible with native Java class names. So we’d have to saddle ourselves with a name mangling scheme to launder a random filename into a source-denotable Java class name. If ever there was a siren song, this is a loud one!</p></div></div></blockquote><div><br data-mce-bogus="1"></div><div>yes,<br data-mce-bogus="1"></div><div>i would prefer a constant name like UnnamedClass.<br></div><div><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>