On Saturday, 4 February 2012 at 10:56:14 UTC, bobef wrote:
Great news. ...
Same here!
This is the number one thing I waited for to be ported to D2. I
never considered moving to D2 without Tango. Big thanks to
SiegeLord and all the other contributors.
Just one example why I like Tango:
hello_tango.d:
module hello_tango;
// dmd 2.057 + SiegeLord-Tango-D2-4c9566e 2012-01-24
import tango.io.Stdout;
int main(string[] args)
{
foreach(i, arg; args)
{
Stdout.formatln(" arg {,3}: '{}'", i, arg);
}
return 0;
}
rdmd --build-only -release -O hello_tango.d
hello_tango a b ä ö
arg 0: 'hello_tango'
arg 1: 'a'
arg 2: 'b'
arg 3: 'ä'
arg 4: 'ö'
hello_phobos.d:
module hello_phobos;
// dmd 2.057
import std.stdio;
int main(string[] args)
{
foreach(i, arg; args)
{
stdout.writefln(" arg %3d: '%s'", i, arg);
}
return 0;
}
rdmd --build-only -release -O hello_phobos.d
hello_phobos a b ä ö
arg 0: 'hello_phobos'
arg 1: 'a'
arg 2: 'b'
arg 3: '+ñ'
arg 4: '+Â'
E:\source\D\d2>dir he*
09.02.2012 15:18 204 hello_phobos.d
09.02.2012 15:18 992.284 hello_phobos.exe
09.02.2012 15:18 250 hello_tango.d
09.02.2012 15:18 180.764 hello_tango.exe
The hello_tango.exe is much smaller and it even works with
strange german umlauts :-)
BTW:
Tango doesn't build (bob) with dmd 2.058 beta because of:
...
dmd -c -I. -release -oftango-net-device-Berkeley-release.obj
./tango/net/device/Berkeley.d
object.Exception@build\src\bob.d(632): Process exited normally
with return code 1
.\tango\net\device\Berkeley.d(1921): Error: cannot implicitly
convert expression (new char[][](cast(uint)i)) of type char[][]
to const(char)[][]