Programing experiments

Checking out D

Every now and then I have a look at the D language page.

D is a clean and powerful language. I.e. read similar to Java or C#, yet it compiles to native code, link natively (at no cost!) with C and is optimized towards speed and system programming.

It is created, own and maintained by a DigitalMars which also produce its own C++ compiler.

The underwhelming thing with D, at least from perspective, is that it has been created for system programming and there are no fully featured modern GUI or IDE (for Windows).

That is, last time I checked.
Now there is also a D community Website, chock full of third party product made by enthusiast.

Of interest, this time, I noticed DFL (the D Form Library, for Windows smile_omg) and Entice, a D IDE with a form designer.

Out of curiosity I downloaded it (757kb), installed it (quick) and run it.

WoW. The first 0.2 second blew me away.

It is the time it took for this guy to come out


And the code looks pretty much like WinForm 1.0, look

/*    Generated by Entice Designer    Entice Designer written by Christopher E. Miller    www.dprogramming.com/entice.php*/import dfl.all;class MyForm: dfl.form.Form{// Do not modify or move this block of variables.//~Entice Designer variables begin here.dfl.button.Button button1;dfl.groupbox.GroupBox groupBox1;dfl.button.RadioButton radioButton1;dfl.button.RadioButton radioButton2;dfl.button.RadioButton radioButton3;//~Entice Designer variables end here.this(){initializeMyForm();//@  Other MyForm initialization code here.button1.click ~= &myButton_click;}private void myButton_click(Control sender, EventArgs ea){msgBox("You clicked the button!");}private void initializeMyForm(){// Do not manually modify this function.//~Entice Designer code begins here.//~DFL Formtext = "My Form";clientSize = dfl.all.Size(502, 325);//~DFL dfl.button.Button=button1button1 = new dfl.button.Button();button1.name = "button1";button1.text = "Click me";button1.bounds = dfl.all.Rect(16, 16, 115, 47);button1.parent = this;//~DFL dfl.groupbox.GroupBox=groupBox1groupBox1 = new dfl.groupbox.GroupBox();groupBox1.name = "groupBox1";groupBox1.text = "Choice is yours";groupBox1.bounds = dfl.all.Rect(24, 96, 208, 136);groupBox1.parent = this;//~DFL dfl.button.RadioButton=radioButton1radioButton1 = new dfl.button.RadioButton();radioButton1.name = "radioButton1";radioButton1.text = "One";radioButton1.bounds = dfl.all.Rect(25, 22, 75, 23);radioButton1.parent = groupBox1;//~DFL dfl.button.RadioButton=radioButton2radioButton2 = new dfl.button.RadioButton();radioButton2.name = "radioButton2";radioButton2.text = "Two";radioButton2.bounds = dfl.all.Rect(25, 62, 75, 23);radioButton2.parent = groupBox1;//~DFL dfl.button.RadioButton=radioButton3radioButton3 = new dfl.button.RadioButton();radioButton3.name = "radioButton3";radioButton3.text = "Three";radioButton3.bounds = dfl.all.Rect(25, 102, 75, 23);radioButton3.parent = groupBox1;//~Entice Designer code ends here.}}int main(){int result = 0;try{Application.enableVisualStyles();//@  Other application initialization code here.Application.run(new MyForm());}catch(Object o){msgBox(o.toString(), "Fatal Error", MsgBoxButtons.OK, MsgBoxIcon.ERROR);result = 1;}return result;}
.csharpcode, .csharpcode pre{font-size: small;color: black;font-family: consolas, "Courier New", courier, monospace;background-color: #f0f0f0;border: 1px solid #808080;/*white-space: pre;*/}.csharpcode pre { margin: 0em; }.csharpcode .rem { color: #008000; }.csharpcode .kwrd { color: #0000ff; }.csharpcode .str { color: #006080; }.csharpcode .op { color: #0000c0; }.csharpcode .preproc { color: #cc6633; }.csharpcode .asp { background-color: #ffff00; }.csharpcode .html { color: #800000; }.csharpcode .attr { color: #ff0000; }.csharpcode .alt {background-color: #f4f4f4;width: 100%;margin: 0em;}.csharpcode .lnum { color: #606060; }


Well I’m too fond of C# and WPF to spend too much time on a beta version. But it is certainly something to keep an eye on, in case I ever need to write some native code (i.e. non-.NET). As I never really managed to do anything worthwhile with C++/MFC/ATL (except some work project smile_wink)

Categories: General
Permalink | Comments (0) | Post RSSRSS comment feed
blog comments powered by Disqus