commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <>
Subject Re: [lang] mutables
Date Sun, 13 Jun 2004 14:37:14 GMT

On Sat, 12 Jun 2004, matthew.hawthorne wrote:

> Henri Yandell wrote:
> > The constructor for MutableNumber is odd.
> >
> > It's
> >
> > a) Empty, so possible to have a MutableNumber without a value yet.
> > b) package-scoped, so only we can extend it.
> >
> > I'm not sure if there are good uses for a), but b) seems like something we
> > don't need to do.
> I guess I didn't think that anyone would want to create a MutableNumber,
> they would opt for the more specific MutableInteger, MutableFloat, etc.

I don't think they would either, though it is feasible I guess so not
worth making the class abstract.

I meant that the package-scoped constructor meant that people can't add
empty constructors to subclasses.

> But if that's not the case, then the package scoping is too restrictive and
> should be changed to public.  The default (empty) constructor doesn't
> make sense to me either, maybe it was just an oversight.

Easy to kill.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message