[Mono-list] Re: Is Objective-C support possible?
Fri, 15 Feb 2002 11:25:36 -0600
This article is interesting in that it points to some limitations in
Microsoft's implementation of the CLR, pitfalls that Mono should try
* Implement tailcall efficiently. MS CLR has a very slow
implementation. This (almost) gives you efficient
* box/unbox should use tagged pointers in some cases,
particularly integers. With tailcalls, this improves
performance of continuations.
* instanceof and castclass should have a very fast path in the
case where an object *is* type T. Furthermore, ORP, I think,
implemented a faster check for type inheritance. This will make
collection classes faster. Done well, plus box/unbox
improvement above, I think it would make "type erasure"
implementation of generics nearly as fast as any real runtime
* The Reflection classes are quite painful for dynamic
languages. It's slow, cumbersome, and limited. I'm partial to
UPenn's extension to Cornell's Cyclone for runtime code
generation (not implemented in the current version). There is
probably an analogue for the CLR. Microsoft's Reflection APIs
can be built on top of that.
* Dynamic assemblies are too static. In particular, many
languages view code (methods) as just another datastructure,
which should be dropped when noone refers to it. There ought to
be a way to manually tell the runtime to remove a class from a
dynamic assembly. Suddenly, Lisp's "eval" works!
* Better yet, implement closures. Here's a chance for open source
folks to "embrace and extend" Microsoft. Wouldn't that be fun?
* An interface with the GC that allows me to scan the heap for
certain types of objects. Many languages need better
integration with the GC to make whole-program changes. This is
an easy one.
I can't speak to the limitations of the type system. Frankly, I think
many languages can get around it if these improvements are made.
There's always the problem, however, of getting MY language to interop
with YOUR language. Noone really has a solution for the general case,
but limited interop with C# can usually be done from most languages.
My 2 cents.
Paul> This article suggests it would be impossible to write an
Paul> Objective-C or TOM compiler for .NET or any .NET clones. Can
Paul> anybody clarify this issue?