digitalmars.D - D.NET update
- Deja Augustine (41/41) Jul 31 2004 To all of you out there waiting with bated breath for D.NET, you may now...
- Matthew (4/45) Jul 31 2004 Sounds like you're progressing well.
- J Anderson (5/47) Aug 01 2004 This is Great! When this is done, C# users won't have an excuse not to
- Matthias Becker (1/1) Aug 01 2004 Sounds great!
- Walter (1/1) Aug 01 2004 Congrats!
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"); // 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 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
Jul 31 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"); // 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 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
Jul 31 2004
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"); // 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 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/
Aug 01 2004