Re: Does D supply basic error codes?

2012-01-29 Thread Jesse Phillips
On Sunday, 29 January 2012 at 23:58:50 UTC, bearophile wrote: mta`chrono: import core.stdc.stdlib; int main() { return EXIT_FAILURE; // EXIT_SUCCESS works here too. } And in D void main(){} returns a EXIT_SUCCESS. Bye, bearophile Except when exited due to an exception thrown.

Re: Overriding Template Methods

2012-01-29 Thread H. S. Teoh
On Sun, Jan 29, 2012 at 06:43:39PM -0800, Ali Çehreli wrote: [...] > Template member functions cannot be virtual. > > One quick reason why this is so is that Derived.writeValueType would > have to be instantiated by the compiler, for every possible type in > the program. This would lead to almost

Re: Overriding Template Methods

2012-01-29 Thread Daniel L. Alves
Hey, thank you very much for the explanation! Daniel

Re: Overriding Template Methods

2012-01-29 Thread Ali Çehreli
On 01/29/2012 06:23 PM, Daniel L. Alves wrote: > Hi, > I don't know if this is a bug or if I'm doing something wrong, but I'm not > being able to override template methods. This can be seen with this simple code: > > class Base > { > void writeValueType( T )( T value ) > { >

Overriding Template Methods

2012-01-29 Thread Daniel L. Alves
Hi, I don't know if this is a bug or if I'm doing something wrong, but I'm not being able to override template methods. This can be seen with this simple code: class Base { void writeValueType( T )( T value ) { writefln( "This is Base.writeValueType: value %s has type %s", value, t

Re: Partial classes

2012-01-29 Thread Jonathan M Davis
On Sunday, January 29, 2012 22:43:26 Mars wrote: > Hello everybody. > Quick question, is there anything like C#'s partial classes in D? Not really, no. It's one file per module by design. However, you can use template and string mixins to add code from other files. - Jonathan M Davis

Re: Does D supply basic error codes?

2012-01-29 Thread bearophile
mta`chrono: > import core.stdc.stdlib; > > int main() > { > return EXIT_FAILURE; // EXIT_SUCCESS works here too. > } And in D void main(){} returns a EXIT_SUCCESS. Bye, bearophile

Re: Does D supply basic error codes?

2012-01-29 Thread Jonathan M Davis
On Sunday, January 29, 2012 23:21:16 NewName wrote: > Hello all. > C has EXIT_FAILURE and EXIT_SUCCESS to be returned from main(). > Does D have similar predefined values? No, but you can use the C ones if you want, as mta`chrono points out. - Jonathan M Davis

Re: Does D supply basic error codes?

2012-01-29 Thread mta`chrono
import core.stdc.stdlib; int main() { return EXIT_FAILURE; // EXIT_SUCCESS works here too. } Am 30.01.2012 00:21, schrieb NewName: > Hello all. > C has EXIT_FAILURE and EXIT_SUCCESS to be returned from main(). > Does D have similar predefined values?

Re: Clutter GObject bindings

2012-01-29 Thread Artur Skawina
On 01/29/12 23:51, Sparse Push wrote: > >> Done. Does the resulting clutter API look usable? >> http://repo.or.cz/w/girtod.git/blob/refs/heads/gtk2:/gtk2/clutter.d >> None of the new modules were tested - i still need code samples to port and >> time > to fix any bugs. >> artur > > Now I am goin

Does D supply basic error codes?

2012-01-29 Thread NewName
Hello all. C has EXIT_FAILURE and EXIT_SUCCESS to be returned from main(). Does D have similar predefined values?

Re: Clutter GObject bindings

2012-01-29 Thread Sparse Push
> Done. Does the resulting clutter API look usable? > http://repo.or.cz/w/girtod.git/blob/refs/heads/gtk2:/gtk2/clutter.d > None of the new modules were tested - i still need code samples to port and > time to fix any bugs. > artur Now I am going to feel bad if I don't create something awesome w

Re: A tutorial on D templates: updates

2012-01-29 Thread NewName
I'm learning D. So thanks for the tutorial. I hope D becomes more popular, as it deserves.

Re: Partial classes

2012-01-29 Thread bearophile
Mars: > Hello everybody. > Quick question, is there anything like C#'s partial classes in D? In D there are ways to compose classes, using static methods of interfaces, with "alias this", and even low-level ways like mixin(import("filename.d")), and so on. But currently there are no partial cla

Partial classes

2012-01-29 Thread Mars
Hello everybody. Quick question, is there anything like C#'s partial classes in D? Mars

A tutorial on D templates: updates

2012-01-29 Thread Philippe Sigaud
Hello, [cross-posted with D.announce, since it's a topic of interest for people learning D] I posted there a few weeks ago about a tutorial on D templates I put in github: https://github.com/PhilippeSigaud/D-templates-tutorial/blob/master/dtemplates.pdf Since then, I received numerous mails, i

Re: Clutter GObject bindings

2012-01-29 Thread Artur Skawina
On 01/29/12 17:27, Artur Skawina wrote: > On 01/28/12 17:08, Artur Skawina wrote: >> On 01/28/12 03:02, Sparse Push wrote: >>> What is the best way to generate GObject bindings? >>> I ask this because I would like to use Clutter >>> (http://www.clutter-project.org/) in my D program and I don't thin

Re: Clutter GObject bindings

2012-01-29 Thread Artur Skawina
On 01/28/12 17:08, Artur Skawina wrote: > On 01/28/12 03:02, Sparse Push wrote: >> What is the best way to generate GObject bindings? >> I ask this because I would like to use Clutter >> (http://www.clutter-project.org/) in my D program and I don't think it has D >> bindings already. > >>From the

Re: floating-WTF - Compiler-BUG with 64bit

2012-01-29 Thread Jonathan M Davis
On Sunday, January 29, 2012 08:43:54 sclytrack wrote: > Prior to filing the bug I tried to compile dmd from source. > I have now succeeded. The only problem I had was a missing > symbolic link libstdc++.so and this in Ubuntu 11.10. So > I just created it. > > /usr/lib32/libstdc++.so -> /usr/lib/i3