Re: Generic functions to convert to void* and from void*

2009-02-23 Thread Daniel Keep
TSalm wrote: I'm trying to build function which have the hability to convert a type to void* and from void*. >> >> First of all, I have to ask: have you looked at std.variant / >> tango.core.Variant? >> > Yes, but it seems that Variant class uses more memory than void* . The Phobos Vari

Re: parsing parameters

2009-02-23 Thread BCS
Hello Robert, BCS wrote: Theory 1: it's a side effect of two features: this is allowed int myFunc(int) // I never use the arg so why name it? { } and this is allowed int myFunc(int i = 5) // normal defaulting { } so to avoid corner cases they are allowed in combination theory 2: it give

Re: parsing parameters

2009-02-23 Thread Robert Fraser
BCS wrote: Reply to Ellery, BCS wrote: I don't understand your question. Are you suggesting that something be added or asking why something is allowed? Why is it allowed? for example: int myfun(int=10); Theory 1: it's a side effect of two features: this is allowed int myFunc(int) //

Re: CUDA with D?

2009-02-23 Thread Lutger
Chris R Miller wrote: > Trass3r wrote: >> Is there any tutorial or code for using CUDA with D? > > Short answer: no. > > I looked into writing CUDA with D a while back. The problem is that the > CUDA C runtime and the D runtime are 100% incompatible. CUDA works by > taking C-like code and co

Re: Generic functions to convert to void* and from void*

2009-02-23 Thread TSalm
I'm trying to build function which have the hability to convert a type to void* and from void*. First of all, I have to ask: have you looked at std.variant / tango.core.Variant? Yes, but it seems that Variant class uses more memory than void* . [...] I get the distinct impression that you

Re: parsing parameters

2009-02-23 Thread BCS
Reply to Ellery, BCS wrote: I don't understand your question. Are you suggesting that something be added or asking why something is allowed? Why is it allowed? for example: int myfun(int=10); Theory 1: it's a side effect of two features: this is allowed int myFunc(int) // I never use

Re: parsing parameters

2009-02-23 Thread Ellery Newcomer
BCS wrote: I don't understand your question. Are you suggesting that something be added or asking why something is allowed? Why is it allowed? for example: int myfun(int=10);

Re: "Symbol undefined" on interface with public getter and package setter

2009-02-23 Thread Ellery Newcomer
Daniel Keep wrote: TSalm wrote: I'm not sure but I think package is not virtual. :-( So there's really no way to have a method declared "package" in an interface ? You also can't have a private function in an interface. This once lost me four days trying to figure out why my program wouldn'

Re: parsing parameters

2009-02-23 Thread BCS
I don't understand your question. Are you suggesting that something be added or asking why something is allowed?

Re: "Symbol undefined" on interface with public getter and package setter

2009-02-23 Thread grauzone
Last time I checked I could even use "override" to... erm, override methods that had package protection. The compiler didn't even complain, and I had to find out the hard way that the method wasn't virtual.

Re: CUDA with D?

2009-02-23 Thread Chris R Miller
Trass3r wrote: Is there any tutorial or code for using CUDA with D? Short answer: no. I looked into writing CUDA with D a while back. The problem is that the CUDA C runtime and the D runtime are 100% incompatible. CUDA works by taking C-like code and compiling it with a special NVCC compil