[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DotGNU]DotGNU-Libs Mailing List for Commits proposal
From: |
Rhys Weatherley |
Subject: |
Re: [DotGNU]DotGNU-Libs Mailing List for Commits proposal |
Date: |
Tue, 1 Apr 2003 08:56:14 +1000 |
User-agent: |
KMail/1.4.3 |
On Monday 31 March 2003 05:44 pm, Peter Minten wrote:
> My humble suggestion: put it in the baselib. Due to the sealed classes it's
> impossible to implement some stuff elsewhere. Plus you can put convenience
> methods high into the classes.
We don't have the luxury of adding things to mscorlib's public API. It is
important that DotGNU programs be able to run on other CLR's, with perhaps
the addition of libraries, but not library replacement. Adding
"DotGNU.CoolStuff.dll" to Mono/Rotor/MS is easy - replacing their equivalents
of "mscorlib.dll" is not.
Sealed classes can be wrapped in others, using an "Adapter" pattern if you
really need to extend the functionality. An "IOStream" class could be
implemented as an adapter on a "Stream" object for your example: users who
prefer the boring Read/Write API would use the "Stream", but those who prefer
stream operators can wrap it in an "IOStream".
Cheers,
Rhys.