Paving the on-ramp
Jim Laskey
james.laskey at oracle.com
Thu Oct 20 13:16:21 UTC 2022
The POC indeed does this now (error otherwise).
On Oct 20, 2022, at 10:12 AM, Guy Steele <guy.steele at oracle.com<mailto:guy.steele at oracle.com>> wrote:
On Oct 19, 2022, at 4:16 PM, John Rose <john.r.rose at oracle.com<mailto:john.r.rose at oracle.com>> wrote:
. . .
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!
If we go down that path, this problem is easily addressed: simply reject the program if its file name is not trivially mappable (via the identity transformation) to a source-denotable Java class name. This rule may seem draconian to some, but it would serve the purpose of guiding the new programmer to use already customary file-naming conventions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-spec-observers/attachments/20221020/eb591496/attachment-0001.htm>
More information about the amber-spec-observers
mailing list