> From: "John Rose" <[email protected]>
> To: "Brian Goetz" <[email protected]>
> Cc: "amber-spec-experts" <[email protected]>
> Sent: Wednesday, October 19, 2022 10:16:11 PM
> Subject: Re: Paving the on-ramp

> On 19 Oct 2022, at 9:43, Brian Goetz wrote:

>> 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.
> 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 pkg/Foo$Bar , for member classes which 
> already
> have an explicit name Foo.Bar ; arguably Foo$Bar is an implicit name. But it
> cannot appear in source.)

It can appear in the source, '$' is a valid character for an identifier. 

> 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!

yes, 
i would prefer a constant name like UnnamedClass. 

Rémi 

Reply via email to