[Mono-devel-list] Reuse parts of MCS in Class Libraries?
Mark
nospaming at cox.net
Sun May 9 17:55:43 EDT 2004
Jon,
Thank you for taking the time to respond. I appreciate your feedback.
> To answer an unstated question: The C# class libraries (mscorlib.dll,
> System.dll, etc.) are under the MIT/X11 license (like BSD without the
> advertising clause), NOT GPL/LGPL. The mcs compiler *is* GPL. The
> tools in the "tools" directory have a variety of licenses, mostly GPL.
>
> It's the mono runtime libraries (libmono.so and related; basically the
> JIT, internal calls, and anything written in C) which are LGPL.
Thank you for that explanation. That helps to understand that.
> To clarify, CodeDom is not used to parse existing code. It's used to
> generate source code, which can then be handed to an external compiler
> to be compiled into an assembly.
Yes. You are right. It is just an API for generating code. However, I
thought it could be much more and I can see that what I want may not fit
in well at the moment.
Standards Conformance
=====================
As an aside, I don't think MS has any problem with deviating from any
given standard, even their own. Wouldn't it be possible for Mono to
extend and deviate from the standard in either the class libraries or
the runtime itself? Wouldn't it be possible to put attributes around
non-standard code and a compiler option could determine if those
additional attributes will be allowed? Then, using Mono, you could
target cross-platform (ie MS .NET and Mono) or stick to Mono and use
additional, enhanced things.
My Background
===============
I've worked on DelphiWebScript (http://www.dwscript.com/) an MPL
licensed scripting tool for Delphi. I had written several types of code
generators for this tool and had many other plans that were too
complicated to implement until .NET and Mono came along. I look to Mono
to bring what I've missed in Linux... namely a very productive and
powerful coding environment.
Real Goals
================
I want a high-level abstraction of code. I want objects to represent
types and expressions. I want to be able to manipulate these objects in
either a commercial or GPL project. I want the object representations to
be exported as code or IL for immediate use or in an assembly. I see
much of what I want in the Mono compiler. However, it isn't quite a
match and I don't expect my additions or changes to be well received as
they are not mainstream. I misunderstood the CodeDom and thought it
would generate the IL directly and skip the requirement for a code
representation. Now, if you imagined the CodeDom being like the MCS
(objects for code types and expressions) and that the CodeDom objects
could be converted to text or IL then that would be exactly what I want.
I was hoping that the CodeDom would give me that.
If there is something else that is better suited then please let me know.
> See: http://lists.ximian.com/archives/public/mono-list/2002-May/005929.html
Thanks for the reference.
> System.Reflection.Emit is a better bet for dynamic languages, and some
> of the enhancements in .NET 2.0 such as DynamicMethods will make this
> easier:
>
> http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/system.reflection.emit/c/dynamicmethod/dynamicmethod.aspx
Very interesting. This is, in fact, a partial solution for me. However,
it is still too limited for my larger goals. I agree that S.R.Emit is a
better solution. I mistakenly thought that the CodeDom did this.
If you are interested, I would like to talk further about the larger
goals off-list. I haven't explained what I'd do with it yet. :) I'd like
to talk with Miguel about it too but I don't want to be a pest as I
realize he and others are very busy. I don't think this is the right
forum to get into it though. If you know Miguel better, do you think it
appropriate for me to send him an email with a more detailed description
of my ideas? I'd love to work for Novell and do it full time. ;)
>>Reuse or Recode?
>>========================
[...]
> As stated before, this is fine as long as the licensing conditions can
> be met. As you're looking for something that can be used in proprietary
> software, you can't use mcs for this.
Correct. This is my dilema. I want this ability to make my development
efforts at work much easier but also usable in GPL applications. I don't
see a way to do it right now.
Thanks for your responses. If you or anyone else has any other ideas for
how to achieve this then I would appreciate it.
-Mark E.
More information about the Mono-devel-list
mailing list