[2105] in java-interest

home help back first fref pref prev next nref lref last post

Public class == File Name = Why?

daemon@ATHENA.MIT.EDU (anders.rundgren@seuppbt.pharmacia.)
Mon Sep 25 13:02:29 1995

From: anders.rundgren@seuppbt.pharmacia.se
Date:  Mon, 25 Sep 1995   15:14:52  +0100
To: java-interest@java.sun.com

Hi,
In the current (Alpha3) language specification there is a line that says=20
that there can be max 1 public class or interface per CU (compilation Unit)=
.=20
 Also there is a compiler warning if the source file differs from the name=20
of the public class.  The reason behind all this seems to be that the=20
compiler can automatically invoke source files for external classes.

My question is: Is Java the only computer language where the source file=20
name is a part of the language grammar?  Should not be there IMO.

Assuming that I am correct this is what I would like to see in the Beta=20
release:
1. Delete the requirement that multiple public classes cannot be in the sam=
e=20
CU.  It is nice to put public classes and interfaces that belong together i=
n=20
the same file.  BTW, It works just fine in A3. You get a warning but thats=20
all.  In the planned Beta all warnings have been taken away so this pratice=
=20
is soon broken.

2. As the auto-source-search feature *may* be useful (until an integrated=20
environment is here) if standard MAKE files are to be used, this should be=20
controllable with a switch like "-disable-auto-source-search" that=20
effectively disable the tests for multiple public classes/interfaces and=20
source file name comparisions.

Anyone, right or wrong?

Regards
Anders Rundgren
Vincent Engineering

-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post