discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Case for a new runtime (Was: Re: Obj C and standards)


From: strobe anarkhos
Subject: Re: Case for a new runtime (Was: Re: Obj C and standards)
Date: Mon, 16 Apr 2001 01:15:38 -0700

At 10:19 PM -0400 4/15/01, Alain Toussaint wrote:
>may i chip in ??
>
>> * The ability to share your compiled code with others not using your
>> language.
>
>i have a question here,would it be possible to overide[1] a method in
>one language with code from another ??

Yes. The reason why is because the objects you are using are general objects 
used in the general runtime for objects. Meaning if you create an object in TOM 
it's identical to compiling one in another language.

>[1] = pardon the wording but i'm not sure i use the exact term,that
>could be "inherit"
>
>here's a possible case for that:
>
>suppose such a framework is used in army (that's where i'll be heading
>in a few years,the Canadian army to be exact) and there's a bug in one
>of the libraries (coded in ObjC for example),i'm much more of a python
>coder than an ObjC one,could i be able to provide a replacement Jython
>(Java based python) method without causing a recompile of the entire
>framework or part of it (just drop the jython method in-place and let
>it rip) ??
>
>if such thing was possible,that would be a real boon where you (or me)
>have to deploy a system ASAP (that can happen in the army)....

If you define a class A in Objective-C, for example a Foundation class like 
NSData, the GRO can then use the library compiled to create an IDL-ish header. 
This header can then be converted to a Python source file. Now in Python you 
can create a subclass and define your own methods. When you compile this class 
it uses the same GRO interface.

This also means you can use class extensions like adding or replacing methods 
in an existing library without the source. Because it's one general runtime you 
can extend any class with TOM and any other language could use the new methods 
and/or variables. The key is the runtime would provide this facility which some 
languages can access.

The class extension itself would be a separate binary. The other libraries 
would not have to be recompiled, they don't link to specific libraries (other 
than the GRO library or GRO-compatible library).

The bottom line is all languages would compile libraries which ultimately use 
the same interface. GRO can use this interface to create an IDL-ish header then 
you use a script to convert this into your language-specific source file. Your 
compiler will then compile a GRO object library which can be used by any other 
program using the GRO.

If 'Jython' uses bytecode that adds a lot of complexity to the project. However 
it would be possible to route method invocations without using a proxy system. 
The bytecode wrapper would allow bytecode to define class interfaces in GRO 
(which is not bytecode) and call other interfaces by name. However bytecode 
will NOT be able to extend classes because it's not in the Sun spec.

Also this is impossible to do with JNI. The only way to do this is to take an 
open source JVM and patch it so it uses GRO instead of it's own runtime.

However as far as you're concerned it's a good thing because you CAN extend 
classes defined in bytecode using other languages like TOM.

This would also be a lot faster than Apple's Java bridge which uses a proxy 
system. There would be no proxies in GRO wrappers. I think a wrapper for 
libs/apps compiled to use Apple's runtime is also possible.

> > A lot of work for a lot of gain, but what's going to happen if
>> something like this doesn't materialize?
>
>i hate to say this but people who need something like that will flog to
>MS .NET (for the record,it's been about 5 years i run Linux fulltime
>and this is the first time i really think MS have a good idea).

C# has the same limitations of COM. C# is not that novel.

> > I think the framework I've laid out is feasible. Am I the only one
>> who thinks this is a great (yet unoriginal) idea?
>
>no you're not along,I,Jon Udell (you surely heard of him right ??) and
>Microsoft think it's a VERY good idea !!

Microsoft is more interested in promoting their proprietary COM-like technology 
which when you look beyond the hype is just COM under another name.

>Alain Toussaint
>
>p.s. do you mind if i forward your mail to Jon Udell and the Byte
>newsgroup ??

Not at all



reply via email to

[Prev in Thread] Current Thread [Next in Thread]