[MUD-Dev] C# vs. LPC

Owen owend at obscure.org
Wed Jun 28 08:04:56 CEST 2000


On Tue, 27 Jun 2000, Felix A. Croes wrote:

> > C# provides "versioning" support -- which, from what I can see,
> > basically means merely that you have to explicitly say that you want
> > to override inherited methods, variables, etc. 
> 
> When I first saw this mentioned in the doc, my heart made a little
> leap -- I was hoping for something that would improve on Java's
> failure to deal with the replacement of class code, without a cold
> boot of the entire runtime system.  Alas, I was disappointed.

  actually, by writing a custom class loader and loading all your classes
through that, there are ways to sort of "warm boot" the java run time.  
we do this all the time at work with the servlet container that we use.  
just drop a new class file into the repository, and it will reload them
all.  it does instantiate all the classes again, but if you are careful to
make all the interesting state persist in a database, it's pretty close.  
it's really nice for rapid development.

(direct from the JServ documentation, with grammatical errors intact)

 * When the classloader reports its creator that one of the classes it
 * has loaded has changed on disk, it should discard the classloader
 * and create a new instance using <CODE>reinstantiate</CODE>.
 * The classes are then reloaded into the new classloader as required.
 * The Java VM considers two classes the same if they have the same
 * fully-qualified name and if they were loaded from the same
 * ClassLoader.
 * There is no way for a classloader to 'undefine' a class once it
 * has been loaded.  However, the servlet engine can discard a
 * classloader and the classes it contains.
 * The JServServletManager creates a new instance of the classloader each
 * time it detects that any of the loaded classes have changed.
 * <P>Before terminating, all servlets are destroyed.
 * <P>According to the Java Language Specification (JLS), classes may
 * be garbage-collected when there are no longer any instances of that
 * class and the <CODE>java.lang.Class</CODE> object is finalizable.
 * It is intended that this be the case when a JServClassLoader is discarded.


<off topic>
  my reaction to all this C# stuff is mostly just weariness.  here we go
again.  there are plenty of existing languages that are somewhere between
C and VB that microsoft could have adopted.  i think most developers (as
opposed to computer scientists) are more interested in what you can do
with a language and it's development environment and libraries than the
language itself.  introducing a new language "just because" seems like a
waste of time and effort to me, but i guess the marketing department at
microsoft was getting antsy about the Java thing.  i hope they're looking
forward to fighting about this for the next 5 to 10 years.  i know i'm
not. :)

owen





_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list