Nice TWiki > Dev > NiceConstructors (r1.33 vs. r1.34) TWiki webs:
Dev | Doc | Main | TWiki | Sandbox
Dev . { Changes | Index | Search | Go }
 <<O>>  Difference Topic NiceConstructors (r1.34 - 02 Feb 2004 - BrianSmith)
Added:
>
>

Isaac, I am having trouble understanding your last comment. Wouldn't your objection be solved by making the implicit constructor for every class package-private by default? Then, code outside the package cannot access the constructor at all, regardless of the visibility of the fields. In your example, it seems that main would be able to see the _aa field anyway because it is defined in the same package, so you don't need the two methods named aa. If you moved main to another package then you wouldn't be able to instantiate class A at all without writing a custom public constructor or a public factory method. So, it seems like my idea supports your request? -- BrianSmith - 02 Feb 2004


Topic NiceConstructors . { View | Diffs | r1.35 | > | r1.34 | > | r1.33 | More }
Revision r1.33 - 02 Feb 2004 - 23:02 GMT - IsaacGouy
Revision r1.34 - 02 Feb 2004 - 23:44 GMT - BrianSmith
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.