[Mono-dev] Functional programming like pure ansi C

Robert Jordan robertj at gmx.net
Thu Aug 16 06:51:37 EDT 2007


Stefan Fink wrote:
> hallo,
> we want to port our own scripting language (only the scripts) to mono (c#). i 
> have a few questions :
> 
> 1. Can i call a new Mono programm inside the other one ???

Yes. You'll have to use the APIs provided by the runtime
(System.Diagnostics.Process).

> 
> 
> 2. include functions from many files ????

Definitely not.

> 
> 3. call by value or call by reference ????

Yes.

> 
> 4. evaluation at runtime

It depends. When speed matters, you'll have to go the IL
generation way (Reflection.Emit). Otherwise use CodeDom
(standard c# code generation API).

The smallest entity is a method.

http://msdn2.microsoft.com/en-us/library/3y322t50.aspx
http://msdn2.microsoft.com/en-us/library/y2k85ax6.aspx

> 5. embedding mono in c / c++ application and call function from the script to
> the application

Yes. You have 2 choices: (a) implement the functions in a DLL and
use the .NET feature called "p/invoke". (b) embed the mono runtime
and expose internal calls to your scripts.

http://www.mono-project.com/PInvoke
http://www.mono-project.com/Embedding_Mono

Robert




More information about the Mono-devel-list mailing list