[Mono-devel-list] New 'published' keyword

Jonathan Pryor jonpryor at vt.edu
Sun Apr 18 13:29:16 EDT 2004


On Sun, 2004-04-18 at 12:21, Ben Maurer wrote:
> There is no need for a keyword. You can use an attribute:
> 
> [Published]
> public void Foo () {
> }
> 
> -- Ben

A keyword or an attribute are not sufficient.  You would need to know
which object instance to use, and you need a way to invoke the method
remotely.  A lot of issues, for which we already have an answer: .NET
Remoting. :-)

Thus, we already have a "published" keyword: the
System.MarshalByRefObject base class.  We just need a way to use .NET
Remoting via Corba.  Remoting.Corba, anyone?

The one downside is that MarshalByRefObject "burns the base class", and
Gtk# already has a required base class, so using .NET remoting won't be
entirely straight forward.

Consequently, some glue code (tying MarshalByRefObject to Gtk# objects)
would be necessary, but I don't think that would be terribly difficult
to write.

Though there is the question of why you'd want to know when a window's
destroy signal in another process was fired...  Wouldn't that be
creating a rather tight coupling between programs?  Further, GTK+
doesn't have intrinsic support for such remote signals, so it would only
be applicable to Gtk# programs, of which there is (currently) a
minority...

 - Jon

> On Sun, 2004-04-18 at 12:08, adam wrote:
> > Hi,
> > 
> > I've had this idea in my head for a while and was wondering what the
> > mono community would make of it.
> > 
> > IMHO [despite my lack of major experience with it] inter-process
> > communication with CORBA / Bonobo is horrible - and with CLI there is
> > surely no longer a need for .idl files?
> > 
> > Couldn't a new keyword [ eg. 'published' ] be added to imply that a
> > class / method / property / delegate is accessable to other processes.
> > Published would imply public. For instance:
> > 
> > published class A {
> > 	published void run() { }
> > 	published int A {
> > 		get {}
> > 		set {}
> > 	}
> > 	published delegate void MyDelegate(string input);
> > 	published MyDelegate myDelegate;
> > }
> > 
> > This idea could be extended if generic libraries declare published
> > methods, for instance a GTK# window's destroy() signal could be marked
> > published.
> > 
> > One may be able to implement this idea using CORBA?
> > 
> > Anyway just an idea,
> > 
> > Adam
> > 
> > 
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list