sábado, junio 12, 2004

Reflection Emit and Parametric Polimorphism Stuff

WOW! Finally the Euro 2004 is here! The best soccer of the all f*ck world! No more mexican trash .... ehr I mean, no more mexican soccer. My teams? Germany, Italy and Holland. No more. One of this must be the champion. The final must be decided between Portugal and Germany, with Portugal as champion, so we can have a beautiful world champion: the semi-final between Germany and Portugal (the first revenge) and the final between Germany and Brasil (the second revenge). World Champion for 2006: Germany. (Note that I'm a big fan of Germany and currently I'm planning to go to study the university there).

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:

Roberto Iza Valdes dijo...
Este blog ha sido eliminado por un administrador de blog.