typedef deprecated - now what ?

2011-12-30 Thread Stephan
is there a template or something in phobos to get the same typesafe behaviour of good old typedef ? S.

Re: Bug or feature? std.c.stdlib.exit() breaks RAII

2011-12-30 Thread Jonathan M Davis
On Thursday, December 29, 2011 23:03:23 Ashish Myles wrote: Since D could conceivably implement a very safe exit() without an explicit use of Exceptions to get around the catch Exception() {} problem you mentioned above, does it make sense to request a safer exit() feature for D? And how

Re: typedef deprecated - now what ?

2011-12-30 Thread Caligo
On Fri, Dec 30, 2011 at 4:35 AM, Stephan s...@extrawurst.org wrote: is there a template or something in phobos to get the same typesafe behaviour of good old typedef ? S. Get over it, move on, and hope they fix the thousands of bugs left in DMD. P.S. use `alias`.

Re: typedef deprecated - now what ?

2011-12-30 Thread Trass3r
is there a template or something in phobos to get the same typesafe behaviour of good old typedef ? I've brought this up several times. People just don't give a shit. http://d.puremagic.com/issues/show_bug.cgi?id=5467

Re: typedef deprecated - now what ?

2011-12-30 Thread Jonathan M Davis
On Friday, December 30, 2011 11:35:28 Stephan wrote: is there a template or something in phobos to get the same typesafe behaviour of good old typedef ? There's a pull request being reviewed but nothing in Phobos yet. https://github.com/D-Programming-Language/phobos/pull/300 - Jonathan M

Re: typedef deprecated - now what ?

2011-12-30 Thread Stephan
On 30.12.2011 12:09, Trass3r wrote: is there a template or something in phobos to get the same typesafe behaviour of good old typedef ? I've brought this up several times. People just don't give a shit. http://d.puremagic.com/issues/show_bug.cgi?id=5467 thats too bad. pull request looks

DLL with D (FreeLibrary problem)

2011-12-30 Thread Exec
Hello everybody. I'm trying to write a DLL in D. Everything is actually working fine, until I reach FreeLibrary, which terminates the test program (written in D) with code 0x1. DllMain is called correctly, and seems to run through. But I never reach the lines after the FreeLib call. DLL:

Re: Bug or feature? std.c.stdlib.exit() breaks RAII

2011-12-30 Thread Ashish Myles
On Fri, Dec 30, 2011 at 5:43 AM, Jonathan M Davis jmdavisp...@gmx.com wrote: On Thursday, December 29, 2011 23:03:23 Ashish Myles wrote: Since D could conceivably implement a very safe exit() without an explicit use of Exceptions to get around the catch Exception() {} problem you mentioned

Re: typedef deprecated - now what ?

2011-12-30 Thread Torarin
2011/12/30 Stephan s...@extrawurst.org: On 30.12.2011 12:09, Trass3r wrote: is there a template or something in phobos to get the same typesafe behaviour of good old typedef ? I've brought this up several times. People just don't give a shit.

Re: DLL with D (FreeLibrary problem)

2011-12-30 Thread Exec
It appears as if the following code in the detach case solves the problem: std.c.stdio._fcloseallp = null; I'm not sure why though... why is the call such a problem, that even crashes the application, and doesn't it have any disadvantages, not to call it?

Re: Bug or feature? std.c.stdlib.exit() breaks RAII

2011-12-30 Thread Jonathan M Davis
On Friday, December 30, 2011 10:45:43 Ashish Myles wrote: Ok, now there are two issues here: IMPLEMENTATION: Implementation of a safe_exit() without an explicit Exception seems to be easy to do at the language level for a single-threaded program -- you simply have a hidden/system class like,

Re: Bug or feature? std.c.stdlib.exit() breaks RAII

2011-12-30 Thread Ashish Myles
Thanks, Jonathan, for your detailed answer. Ashish On Fri, Dec 30, 2011 at 1:41 PM, Jonathan M Davis jmdavisp...@gmx.com wrote: On Friday, December 30, 2011 10:45:43 Ashish Myles wrote: Ok, now there are two issues here: IMPLEMENTATION: Implementation of a safe_exit() without an explicit

Programming on OSX

2011-12-30 Thread Joel Christensen
I've got an Mac with OSX. But I have a few problems with using it with D. 1. I haven't got any media programming going. 2. The readln (etc) isn't much good, same problem as Linux. It can only add characters and remove characters from the end.