[Mono-devel-list] Re: Re: Dynamically changing classes?

Paolo Molaro lupus at ximian.com
Sat Sep 27 09:25:12 EDT 2003

On 09/26/03 Rodrigo B. de Oliveira wrote:
> I can understand all the motivations behind a static and simpler type
> system. But
> don't you think there are features best implemented by the runtime?
> Coroutines and
> continuations, for instance?

The runtime already supports coroutines out of the box. You can try them
out in C# code by using mcs with the -v2 option (google for iterators
and you'll find examples and more information).
Continuations are more tricky:-), but it's not enough to ask: let's add
continuations to the ECMA spec. A lot of research is needed even before
considering how to support continuations in the CLR.
You need to take scheme, smalltalk, ruby and whatnot people in a room
and have them come up with a possible implementation strategy that works
for all of them. There are several ways to implement continuations, each
with their own tradeoffs. Some of those langauges fovour call speed
over continuation speed, for example and it's hard to have a workable
continuation implementation that achieves both.
Then, once the people agree on a common solution, we can discuss how to
implement it in the CLR/mono. From my point of view, there is basically
one constraint: the features of a language should not screwup other
languages that don't use it. This means that continuations, for example,
won't work across code that is not continuation-aware, because that
would mean a slowdown of common code, but I don't think this is a big
limitation, afterall, it's not something that was possible before

Executive summary: efficient continuations support may need changes in
the runtime: nobody presented a proposal for discussion, though.
We can help people implement a proposal in the mono runtime and help
design it in a way that fits the CLR view of the world, but people
interested in the feature should do something more that say "we want
continuations support directly in the CLR". What new opcodes/prefixes
would be necessary? What custom attributes or icalls? What new
constructs? Are the needs of all/most of the languages that use
continuations covered?
The CLR is open to innovation (see generics) and more so is mono
(fast free software runtime): what is missing is a proposal for the
changes that works as a common runtime feature and is implementable.


lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better

More information about the Mono-devel-list mailing list