Re: "call to super must be first statement in constructor"
From: Paul Chapman (paul_at_igblan.free-online.co.uk)
Date: 02/07/05
- Next message: The Abrasive Sponge: "Re: How to save graphics in CSV"
- Previous message: emilio: "How to save graphics in CSV"
- In reply to:(deleted message) Mark Haase: "Re: "call to super must be first statement in constructor""
- Next in thread: Chris Smith: "Re: "call to super must be first statement in constructor""
- Reply: Chris Smith: "Re: "call to super must be first statement in constructor""
- Reply: Tor Iver Wilhelmsen: "Re: "call to super must be first statement in constructor""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 7 Feb 2005 21:56:46 -0000
Mark,
> This sounds more like an interface than a subclass to me.
I'm starting to find out some weird things about Java -- well, they seem
weird to me. :)
One thing is that interface members must be public. This seems to me an
unnecessarily narrow use of interfaces. I started off using interfaces as a
way of "declaring" the methods that objects of other classes might want to
use. But that doesn't help define contracts between classes in the *same*
package.
The package seems to be too large a unit of subdomain development. Of
course, I come from Smalltalk, where everything is "public", so I shouldn't
worry.
Another thing was "protected", which I slowly discovered doesn't give any
"protection" within a package at all. Nor, for that matter, does "default"
access. What seems to be missing is C++'s idea of "protected", ie
accessible only within subclasses.
I am thinking about reorganizing my app into more, smaller packages, to
provide more compile-time protection from my own stupidity (and to increase
the extent to which contracts are self-documenting). But when I look at how
huge some of the standard API packages are, which have presumably been
written by expert Java programmers, I wonder if I'm missing something.
Cheers, Paul
- Next message: The Abrasive Sponge: "Re: How to save graphics in CSV"
- Previous message: emilio: "How to save graphics in CSV"
- In reply to:(deleted message) Mark Haase: "Re: "call to super must be first statement in constructor""
- Next in thread: Chris Smith: "Re: "call to super must be first statement in constructor""
- Reply: Chris Smith: "Re: "call to super must be first statement in constructor""
- Reply: Tor Iver Wilhelmsen: "Re: "call to super must be first statement in constructor""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|