Re: D XML Library (1.0)

2009-03-09 Thread jicman
Clay Smith Wrote: > jicman wrote: > > Greetings. > > > > Will someone point me to a reliable xml handling library? I went to > > dsource and all the XML based projects are all dead. I am sure that Mango > > has a nice one, but I am using phobos. :-( > > > > Any suggestions? > > > > thanks,

Re: D XML Library (1.0)

2009-03-09 Thread Clay Smith
jicman wrote: Greetings. Will someone point me to a reliable xml handling library? I went to dsource and all the XML based projects are all dead. I am sure that Mango has a nice one, but I am using phobos. :-( Any suggestions? thanks, josé Use the dsource. http://www.dsource.org/projec

Re: Reuse of variables referencing const objects

2009-03-09 Thread Chris Nicholson-Sauls
Sergey Kovrov wrote: On 3/9/2009 8:50 PM, Chris Nicholson-Sauls wrote: While not strictly intuitive, you could do this: auto var = Rebindable!(const Foo)(new Foo); assert(var.opDot !is null); As 'opDot' returns the wrapped object (with const intact). The downside to that, however, is that it wo

Re: Moving from 1.0 to D2

2009-03-09 Thread jicman
Steven Schveighoffer Wrote: > On Mon, 09 Mar 2009 17:55:48 -0400, jicman wrote: > > > > > Greetings and salutations... > > > > I am corrently trying to get my co. to see the goodness of D. So, we > > have a huge project, which is already live and 5 co-workers are using, > > which is all base

Re: Displaying type of something

2009-03-09 Thread Georg Wrede
Christopher Wright wrote: Georg Wrede wrote: When creating templates, it is sometimes handy to print the type of something. Is there a trivial way to print it? writeln("Typeof T is: ", typeof(t)); This doesn't work, but you get the idea. For a class or interface: writeln("Typeof T is: "

Re: Moving from 1.0 to D2

2009-03-09 Thread Steven Schveighoffer
On Mon, 09 Mar 2009 17:55:48 -0400, jicman wrote: Greetings and salutations... I am corrently trying to get my co. to see the goodness of D. So, we have a huge project, which is already live and 5 co-workers are using, which is all based on D1, if I may call it that. The project also use

Re: Displaying type of something

2009-03-09 Thread Christopher Wright
Georg Wrede wrote: When creating templates, it is sometimes handy to print the type of something. Is there a trivial way to print it? writeln("Typeof T is: ", typeof(t)); This doesn't work, but you get the idea. For a class or interface: writeln("Typeof T is: ", t.classinfo.name);

Moving from 1.0 to D2

2009-03-09 Thread jicman
Greetings and salutations... I am corrently trying to get my co. to see the goodness of D. So, we have a huge project, which is already live and 5 co-workers are using, which is all based on D1, if I may call it that. The project also uses DFL, dbi (v.62) and juno (v.0.3.5.5), plus other lib

Re: Reuse of variables referencing const objects

2009-03-09 Thread Sergey Kovrov
On 3/9/2009 8:50 PM, Chris Nicholson-Sauls wrote: While not strictly intuitive, you could do this: auto var = Rebindable!(const Foo)(new Foo); assert(var.opDot !is null); As 'opDot' returns the wrapped object (with const intact). The downside to that, however, is that it won't work in those case

Re: D XML Library (1.0)

2009-03-09 Thread jicman
Robert Fraser Wrote: > jicman wrote: > > Greetings. > > > > Will someone point me to a reliable xml handling library? I went to > > dsource and all the XML based projects are all dead. I am sure that Mango > > has a nice one, but I am using phobos. :-( > > > > Any suggestions? > > > > thank

Re: D XML Library (1.0)

2009-03-09 Thread jicman
Brian Wrote: > On Wed, 04 Mar 2009 19:59:47 -0500, jicman wrote: > > > Greetings. > > > > Will someone point me to a reliable xml handling library? I went to > > dsource and all the XML based projects are all dead. I am sure that > > Mango has a nice one, but I am using phobos. :-( > > > > An

Re: Displaying type of something

2009-03-09 Thread Georg Wrede
bearophile wrote: Georg Wrede: When creating templates, it is sometimes handy to print the type of something. Is there a trivial way to print it? writeln("Typeof T is: ", typeid(typeof(t))); (Try alternatives of that with a dynamic type, like a class). Thanks!!! class A { } class

Re: Reuse of variables referencing const objects

2009-03-09 Thread Chris Nicholson-Sauls
Sergey Kovrov wrote: On 3/6/2009 11:29 PM, Steven Schveighoffer wrote: std.typecons.Rebindable http://www.digitalmars.com/d/2.0/phobos/std_typecons.html#Rebindable Thanks Steve, this is what I've been looking for, the only thing missing is comparing against null (is null). -- serg. Whi

Re: Displaying type of something

2009-03-09 Thread bearophile
Georg Wrede: > When creating templates, it is sometimes handy to print the type of > something. Is there a trivial way to print it? writeln("Typeof T is: ", typeid(typeof(t))); (Try alternatives of that with a dynamic type, like a class). Bye, bearophile

Re: Displaying type of something

2009-03-09 Thread Lars Kyllingstad
Georg Wrede wrote: When creating templates, it is sometimes handy to print the type of something. Is there a trivial way to print it? writeln("Typeof T is: ", typeof(t)); This doesn't work, but you get the idea. typeof(t).stringof -Lars

Displaying type of something

2009-03-09 Thread Georg Wrede
When creating templates, it is sometimes handy to print the type of something. Is there a trivial way to print it? writeln("Typeof T is: ", typeof(t)); This doesn't work, but you get the idea.