Re: Static function at module level

2014-08-18 Thread Phil Lavoie via Digitalmars-d-learn
On Monday, 18 August 2014 at 06:46:03 UTC, bearophile wrote: ketmar: other function declarations (methods, nested functions) accepts 'static', so why free functions shouldn't? For various reasons, one of them is that accepting useless code confuses newbies and doesn't allow them to build a

Re: Static function at module level

2014-08-18 Thread Phil Lavoie via Digitalmars-d-learn
On Monday, 18 August 2014 at 05:29:53 UTC, Jonathan M Davis via Digitalmars-d-learn wrote: On Mon, 18 Aug 2014 01:32:40 + Phil Lavoie via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Ok, so after years of D usage I just noticed that this is valid D (compiles anyways

Re: Static function at module level

2014-08-18 Thread Phil Lavoie via Digitalmars-d-learn
On Monday, 18 August 2014 at 14:23:47 UTC, bearophile wrote: H. S. Teoh: Is there a bug filed for this? Probably there is. But I stopped filing similar bugs because they seem to have a very low priority. Bye, bearophile I looked around for it but didn't find it. I filed this one:

Re: Static function at module level

2014-08-18 Thread Phil Lavoie via Digitalmars-d-learn
On Monday, 18 August 2014 at 17:42:37 UTC, ketmar via Digitalmars-d-learn wrote: On Mon, 18 Aug 2014 06:46:02 + bearophile via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: accepting useless code confuses newbies i think that i'm not really a newbie now ;-), but i'm still

Re: Question about operations on class/struct properties

2014-08-18 Thread Phil Lavoie via Digitalmars-d-learn
All you said makes sense. If there is a direct connection between getter, setter and member than yes, returning it by reference is usually more convenient: private T _member; @property ref inout(T) member() inout {return _member;} However, sometimes, there is no direct connection between

Re: Nullable instantiator anyone?

2014-08-17 Thread Phil Lavoie via Digitalmars-d-learn
On Sunday, 17 August 2014 at 19:05:11 UTC, Nordlöw wrote: On Sunday, 17 August 2014 at 18:51:38 UTC, bearophile wrote: It could be sufficient, but note that in Phobos there are two different versions of Nullable, one of them doesn't require extra memory, it uses one value as the null value.

Static function at module level

2014-08-17 Thread Phil Lavoie via Digitalmars-d-learn
Ok, so after years of D usage I just noticed that this is valid D (compiles anyways): static void myFunc() {} What is a static function at module level exactly? In C, that means private, in D, that means ___? Thanks, Phil

Need help with building dmd

2014-08-06 Thread Phil Lavoie via Digitalmars-d-learn
I'm trying to build dmd from source but make can't open the makefile. I checked out the source and everything and the make version I use is the one that comes with the distribution: Digital Mars Make Version 5.06 So I'm in the source folder (...\dmd2\src\dmd\src), I can clearly see that

Re: Need help with building dmd

2014-08-06 Thread Phil Lavoie via Digitalmars-d-learn
On Thursday, 7 August 2014 at 01:18:52 UTC, Brad Anderson wrote: On Thursday, 7 August 2014 at 01:15:36 UTC, Phil Lavoie wrote: [...] make release -fwin32 Here is the output: Error: can't read makefile 'win32' I'm building on Windows btw. Thanks, Phil Close. You need the extension, I

Re: Need help with building dmd

2014-08-06 Thread Phil Lavoie via Digitalmars-d-learn
On Thursday, 7 August 2014 at 01:37:46 UTC, Brad Anderson wrote: On Thursday, 7 August 2014 at 01:27:55 UTC, Phil Lavoie wrote: Nope, still not working, but thx. Hmm, are you in the src directory? Yes and ls *.mak shows three makefiles: osmodel.mak posix.mak win32.mak

Re: Need help with building dmd

2014-08-06 Thread Phil Lavoie via Digitalmars-d-learn
On Thursday, 7 August 2014 at 02:13:38 UTC, Brad Anderson wrote: On Thursday, 7 August 2014 at 01:50:50 UTC, Phil Lavoie wrote: On Thursday, 7 August 2014 at 01:37:46 UTC, Brad Anderson wrote: On Thursday, 7 August 2014 at 01:27:55 UTC, Phil Lavoie wrote: Nope, still not working, but thx.