Reflection Emit
Yesterday I sent my patch for support to EnumBuilder class to the mono-devel list. Now it is going to be possible to use that class to emit the IL for en enum, avoiding the use of TypeBuilder and that stuff ...
However, I note that it is not that hard to emit an enum (you only need to know some things about the internals of the CLI architecture). But since a lot of people are not wanting to know the internals, I think it could help them and could help to keep a clearer approach.
Thus currently to build an Enum using RE you should type:
EnumBuilder enumBuilder = new EnumBuilder ("enumName",
TypeFlags visibility, Type typeoftheEnum);
//Define some values for this enum
enumBuilder.DefineLiteral ("FirstValue", 0);
enumBuilder.DefineLiteral ("Secondvalue, 1");
enumBuilder.CreateType ();
And an enum enumName {Firstvalue, SecondValue} will be created.
Parametric Polimorphism
I was reading the first six pages of this document about generics found at Microsoft UK Research, describing a feature called Parametric Polymorphism that let the CLI to emit collections (just an ArrayList or HashTable) for a certain type, and not anymore for a generalized System.Object. This is great.
Rhino Parser and Lexer Port
I'm working in the port of Java implementation of Javascript, Rhino, that is part of Mozilla Project, to C#, thus we can use it on Mono to build the JScript compiler (by Cesar Lopez Nataren). It doesn't represent any challengue and should be finished by a week or two.
The best and the worst
The best: my friend Mauricio printed for the the Ecma 334 standard! Cool. The worst: the project DotGnu and its FUD (the begin by saying that Mono has spreaded some FUD, and continue saying bad things in his homepage). It even doesn't deserve to be mentiones anymore.
1 comentario:
Publicar un comentario