Thread overview
D.NET update
Aug 01, 2004
Deja Augustine
Aug 01, 2004
Matthew
Aug 01, 2004
J Anderson
Aug 01, 2004
Matthias Becker
Aug 01, 2004
Walter
August 01, 2004
To all of you out there waiting with bated breath for D.NET, you may now breathe a little easier knowing that the project is finally making some headway.  As of this moment, the following code compiles and runs perfectly:

------------------------- main.d -------------------------
pragma(DdotNET_Assembly, "DCorLib");
pragma(DdotNET_Module, "DCorLib");

import test; 	// an assembly written in C# containing a class,
		// TestClass, with two public static methods:
		// PrintInt(Int32 i)
		// PrintString(string s)

void main()
{
    int i = 50;
    TestClass.PrintInt(i);

    i += 25;
    TestClass.PrintInt(i);

    i = i / 3;
    TestClass.PrintInt(i);

    System.String s;
    s = "test string";
    TestClass.PrintString(s);

    System.Console.WriteLine("Internal: {0}", 	
			      cast(System.Object)(s));
    return;
}
-------------------------- end --------------------------

Rest assured, the pragma names will be changed to something a little less verbose later on, and the System.Object cast will shortly become implicit (as will boxing, I hope)

A few things to note:

1. Since the .NET CLR supports global variables and functions, it's not necessary to wrap everything in classes ala C#

2. The import statement has been modified so that if it doesn't find a D module, it looks for assemblies.

3. The compiler automatically imports mscorlib, and all classes automatically derive from [mscorlib]System.Object


While this is promising, it's far from being very useful and there's still a long way to go before I can even offer an alpha release, but I just wanted to let the community know that the foundation is there and the rest should progress much more quickly.

-Deja
August 01, 2004
Sounds like you're progressing well.

I wonder, down the line, how well we may be able to map DTL containers to .NET ones. But that's a chat months away. :-)

Keep up the good work.

"Deja Augustine" <deja@scratch-ware.net> wrote in message news:cehhj8$1iiv$1@digitaldaemon.com...
> To all of you out there waiting with bated breath for D.NET, you may now breathe a little easier knowing that the project is finally making some headway.  As of this moment, the following code compiles and runs perfectly:
>
> ------------------------- main.d -------------------------
> pragma(DdotNET_Assembly, "DCorLib");
> pragma(DdotNET_Module, "DCorLib");
>
> import test; // an assembly written in C# containing a class,
> // TestClass, with two public static methods:
> // PrintInt(Int32 i)
> // PrintString(string s)
>
> void main()
> {
>      int i = 50;
>      TestClass.PrintInt(i);
>
>      i += 25;
>      TestClass.PrintInt(i);
>
>      i = i / 3;
>      TestClass.PrintInt(i);
>
>      System.String s;
>      s = "test string";
>      TestClass.PrintString(s);
>
>      System.Console.WriteLine("Internal: {0}",
>       cast(System.Object)(s));
>      return;
> }
> -------------------------- end --------------------------
>
> Rest assured, the pragma names will be changed to something a little less verbose later on, and the System.Object cast will shortly become implicit (as will boxing, I hope)
>
> A few things to note:
>
> 1. Since the .NET CLR supports global variables and functions, it's not necessary to wrap everything in classes ala C#
>
> 2. The import statement has been modified so that if it doesn't find a D module, it looks for assemblies.
>
> 3. The compiler automatically imports mscorlib, and all classes automatically derive from [mscorlib]System.Object
>
>
> While this is promising, it's far from being very useful and there's still a long way to go before I can even offer an alpha release, but I just wanted to let the community know that the foundation is there and the rest should progress much more quickly.
>
> -Deja


August 01, 2004
This is Great!  When this is done, C# users won't have an excuse not to use D ;)

Deja Augustine wrote:

> To all of you out there waiting with bated breath for D.NET, you may now breathe a little easier knowing that the project is finally making some headway.  As of this moment, the following code compiles and runs perfectly:
>
> ------------------------- main.d -------------------------
> pragma(DdotNET_Assembly, "DCorLib");
> pragma(DdotNET_Module, "DCorLib");
>
> import test;     // an assembly written in C# containing a class,
>         // TestClass, with two public static methods:
>         // PrintInt(Int32 i)
>         // PrintString(string s)
>
> void main()
> {
>     int i = 50;
>     TestClass.PrintInt(i);
>
>     i += 25;
>     TestClass.PrintInt(i);
>
>     i = i / 3;
>     TestClass.PrintInt(i);
>
>     System.String s;
>     s = "test string";
>     TestClass.PrintString(s);
>
>     System.Console.WriteLine("Internal: {0}",                      cast(System.Object)(s));
>     return;
> }
> -------------------------- end --------------------------
>
> Rest assured, the pragma names will be changed to something a little less verbose later on, and the System.Object cast will shortly become implicit (as will boxing, I hope)
>
> A few things to note:
>
> 1. Since the .NET CLR supports global variables and functions, it's not necessary to wrap everything in classes ala C#
>
> 2. The import statement has been modified so that if it doesn't find a D module, it looks for assemblies.
>
> 3. The compiler automatically imports mscorlib, and all classes automatically derive from [mscorlib]System.Object
>
>
> While this is promising, it's far from being very useful and there's still a long way to go before I can even offer an alpha release, but I just wanted to let the community know that the foundation is there and the rest should progress much more quickly.
>
> -Deja



-- 
-Anderson: http://badmama.com.au/~anderson/
August 01, 2004
Sounds great!


August 01, 2004
Congrats!