Re: const main args?

2011-08-20 Thread Dan Olson
mimocrocodil 4deni...@gmail.com writes: I seen what sendmail actually changes they arguments of command line for nice output of ps ax command. May be it changes his argc/argv for this? Yes. Some unix C programs, daemons usually, modify argv to change what ps shows. It works with D too, I

Re: How do pure member functions work?

2011-08-20 Thread David Nadlinger
On 8/20/11 5:13 PM, Sean Eskapp wrote: Does marking a member function as pure mean that it will return the same result given the same parameters, or that it will give the same result, given the same parameters and given the same class/struct members? The second one, the implicit this parameter

Re: Regarding nothrow and @safe

2011-08-20 Thread bearophile
Sean Eskapp: Does nothrow mean the function itself does not through exceptions, or that the function body, as well as any called functions, do not throw? I wonder because allocating new memory inside a @safe nothrow function works, even though I'm used to new allocations throwing exceptions

Re: Why aren't function attributes inferred?

2011-08-20 Thread Sean Eskapp
== Quote from Timon Gehr (timon.g...@gmx.ch)'s article On 08/20/2011 06:50 PM, Sean Eskapp wrote: Since the compiler can clearly tell when a function is not const, safe, pure, or nothrow, why can't they just be assumed, unless proven otherwise? This sort of inference is already done for

Re: Regarding nothrow and @safe

2011-08-20 Thread Timon Gehr
On 08/20/2011 08:18 PM, Sean Eskapp wrote: bearophile: As far as I know they have decided to make memory overflow errors, so they are not exceptions, you can't catch them. Other people will confirm this or not. In this case, how would you go about handling out-of-memory situations? A systems

Re: Regarding nothrow and @safe

2011-08-20 Thread Sean Eskapp
== Quote from Timon Gehr (timon.g...@gmx.ch)'s article On 08/20/2011 08:18 PM, Sean Eskapp wrote: bearophile: As far as I know they have decided to make memory overflow errors, so they are not exceptions, you can't catch them. Other people will confirm this or not. In this case, how

Re: How do pure member functions work?

2011-08-20 Thread Jonathan M Davis
On Saturday, August 20, 2011 16:53:51 Sean Eskapp wrote: == Quote from Timon Gehr (timon.g...@gmx.ch)'s article On 08/20/2011 06:24 PM, Sean Eskapp wrote: == Quote from David Nadlinger (s...@klickverbot.at)'s article On 8/20/11 5:13 PM, Sean Eskapp wrote: Does marking a member

Re: Why aren't function attributes inferred?

2011-08-20 Thread Jonathan M Davis
On Saturday, August 20, 2011 16:50:32 Sean Eskapp wrote: Since the compiler can clearly tell when a function is not const, safe, pure, or nothrow, why can't they just be assumed, unless proven otherwise? As of 2.054, @safe, pure, and nothrow are inferred for delegates and templated functions.

Re: Regarding nothrow and @safe

2011-08-20 Thread Jonathan M Davis
On Saturday, August 20, 2011 18:18:25 Sean Eskapp wrote: bearophile: As far as I know they have decided to make memory overflow errors, so they are not exceptions, you can't catch them. Other people will confirm this or not. In this case, how would you go about handling out-of-memory

Re: Regarding nothrow and @safe

2011-08-20 Thread Jonathan M Davis
On Saturday, August 20, 2011 16:41:01 Sean Eskapp wrote: Does nothrow mean the function itself does not through exceptions, or that the function body, as well as any called functions, do not throw? I wonder because allocating new memory inside a @safe nothrow function works, even though I'm