On Tuesday, 15 January 2013 at 22:03:24 UTC, Era Scarecrow wrote:
On Sunday, 13 January 2013 at 16:39:22 UTC, bearophile wrote:
Maxim Fomin:
dmd allows to call static functions on instance.
I think that's a D design mistake (and I think Jonathan Davis
agrees with me), but Walter prefers the
On Sunday, 13 January 2013 at 16:39:22 UTC, bearophile wrote:
Maxim Fomin:
dmd allows to call static functions on instance.
I think that's a D design mistake (and I think Jonathan Davis
agrees with me), but Walter prefers the current behavour.
I'll have to disagree and it should remain an
On Sunday, January 13, 2013 17:39:21 bearophile wrote:
> Maxim Fomin:
> > dmd allows to call static functions on instance.
>
> I think that's a D design mistake (and I think Jonathan Davis
> agrees with me), but Walter prefers the current behavour.
C++ and Java (and probably C# too) have this pro
On 2013-01-13 16:58, Zhenya wrote:
Hi!
Sorry,if it already was discussed,but
import std.stdio;
struct Foo
{
static void bar()
{
writeln("static");
}
void bar()
{
writeln("non-static");
}
}
int main()
{
Foo gun;
gun.bar();//fails here
}
Is it all right,that compiler dosn't prefer non-static fu
On Sunday, 13 January 2013 at 18:16:40 UTC, Zhenya wrote:
On Sunday, 13 January 2013 at 17:59:28 UTC, Andrey wrote:
Don't know if this will be useful in any manner, but it came
this silly way:
class MyClass {
struct _static {
static void myfun() {
On Sunday, 13 January 2013 at 17:59:28 UTC, Andrey wrote:
Don't know if this will be useful in any manner, but it came
this silly way:
class MyClass {
struct _static {
static void myfun() {
writeln("static myfun");
}
}
Don't know if this will be useful in any manner, but it came this
silly way:
class MyClass {
struct _static {
static void myfun() {
writeln("static myfun");
}
}
void myfun() {
writeln("myfun");
On Sunday, 13 January 2013 at 17:17:54 UTC, Maxim Fomin wrote:
On Sunday, 13 January 2013 at 16:23:27 UTC, Zhenya wrote:
On Sunday, 13 January 2013 at 16:18:36 UTC, Maxim Fomin wrote:
Yes, it is a problem - dmd allows to call static functions on
instance. When both match, it issues ambiguity er
On Sunday, 13 January 2013 at 16:23:27 UTC, Zhenya wrote:
On Sunday, 13 January 2013 at 16:18:36 UTC, Maxim Fomin wrote:
Yes, it is a problem - dmd allows to call static functions on
instance. When both match, it issues ambiguity error.
Hmmm...So it will remain as it is?
It hurts me a little bi
Definitely this is a bad design. Even in PHP you can't call
static functions from class instance. :-)
Having two functions with the same name and argument list within
one class is a bad idea too.
On Sunday, 13 January 2013 at 17:04:21 UTC, Maxim Fomin wrote:
On Sunday, 13 January 2013 at 16:39:22 UTC, bearophile wrote:
Maxim Fomin:
dmd allows to call static functions on instance.
I think that's a D design mistake (and I think Jonathan Davis
agrees with me), but Walter prefers the cu
On Sunday, 13 January 2013 at 16:39:22 UTC, bearophile wrote:
Maxim Fomin:
dmd allows to call static functions on instance.
I think that's a D design mistake (and I think Jonathan Davis
agrees with me), but Walter prefers the current behavour.
Bye,
bearophile
Then I agree with both of yo
On Sunday, 13 January 2013 at 16:39:22 UTC, bearophile wrote:
Maxim Fomin:
dmd allows to call static functions on instance.
I think that's a D design mistake (and I think Jonathan Davis
agrees with me), but Walter prefers the current behavour.
Bye,
bearophile
Maybe you could suggest some
Maxim Fomin:
dmd allows to call static functions on instance.
I think that's a D design mistake (and I think Jonathan Davis
agrees with me), but Walter prefers the current behavour.
Bye,
bearophile
On Sunday, 13 January 2013 at 16:18:36 UTC, Maxim Fomin wrote:
On Sunday, 13 January 2013 at 15:58:56 UTC, Zhenya wrote:
Hi!
Sorry,if it already was discussed,but
import std.stdio;
struct Foo
{
static void bar()
{
writeln("static");
}
void bar()
On Sunday, 13 January 2013 at 15:58:56 UTC, Zhenya wrote:
Hi!
Sorry,if it already was discussed,but
import std.stdio;
struct Foo
{
static void bar()
{
writeln("static");
}
void bar()
{
writeln("non-static");
}
}
in
16 matches
Mail list logo