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 correct model
of the D semantics in their head.
Bye,
On Mon, Aug 18, 2014 at 06:46:02AM +, bearophile via Digitalmars-d-learn
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
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
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
):
static void myFunc() {}
What is a static function at module level exactly? In C, that
means private, in D, that means ___?
I'm pretty sure that it means nothing. It's just one of those
cases where an
attribute is ignored, because it doesn't apply rather than
resulting in an
error
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:
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 used to
declare various private module functions and variables as 'static'.
yes,
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
On Mon, 18 Aug 2014 17:55:01 +
Phil Lavoie via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
I don't think he meant you personally.
ah, nothing personal, i just described my use case, maybe using some
vague wording. i AM a newbie in D, there is nothing insulting in being
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
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):
static void myFunc() {}
What is a static function at module level exactly? In C, that
means
On Mon, 18 Aug 2014 01:32:40 +
Phil Lavoie via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
What is a static function at module level exactly? In C, that
means private, in D, that means ___?
nothing. static attribute for free function has no special meaning
12 matches
Mail list logo