On Tuesday, August 13, 2019 3:03:49 AM MDT Jacob Carlborg via Digitalmars-d-
learn wrote:
> On 2019-08-12 11:25, a11e99z wrote:
> > its weird that next compiles in some weird form
> >
> > import std;
> > static class A {
> >
> > static a() { "a".writeln; } // forgot return type
> >
> > }
>
>
On 2019-08-12 11:25, a11e99z wrote:
its weird that next compiles in some weird form
import std;
static class A {
static a() { "a".writeln; } // forgot return type
}
Since you have specified an attribute on "a", the compiler can infer the
return type. In this case it's inferred to
On Monday, August 12, 2019 2:54:56 AM MDT lili via Digitalmars-d-learn
wrote:
> Hi:
> Why need defined an abstract final class?
> see
> https://github.com/Rikarin/Trinix/blob/master/Kernel/arch/amd64/gdt.d
It's one way to effectively create a namespace using a class. Another way
would
On Monday, 12 August 2019 at 09:16:19 UTC, Alex wrote:
On Monday, 12 August 2019 at 08:54:56 UTC, lili wrote:
Hi:
Why need defined an abstract final class?
see
https://github.com/Rikarin/Trinix/blob/master/Kernel/arch/amd64/gdt.d
From what I saw, all members are static. So, this is
On Monday, 12 August 2019 at 08:54:56 UTC, lili wrote:
Hi:
Why need defined an abstract final class?
see
https://github.com/Rikarin/Trinix/blob/master/Kernel/arch/amd64/gdt.d
From what I saw, all members are static. So, this is a kind of
utility class, which is not supposed to be
Hi:
Why need defined an abstract final class?
see
https://github.com/Rikarin/Trinix/blob/master/Kernel/arch/amd64/gdt.d
!Widget) is disabled!
a = new Widget; // Error!
// Cannot assign to rvatue returned by get()!
}
What is the Final in the code?
Widget
a = b; // Error!
// opAssign(Finai!Widget) is disabled!
a = new Widget; // Error!
// Cannot assign to rvatue returned by get()!
}
What is the Final in the code?
I'm guessing something along these lines:
struct Final(T) {
private T value;
alias value this;
this(T
Rikki Cattermole:
I'm guessing something along these lines:
A Phobos patch:
https://github.com/D-Programming-Language/phobos/pull/2881
Bye,
bearophile
Probably borrowed from java:
http://docs.oracle.com/javase/specs/jls/se8/html/jls-4.html#jls-4.12.4
10 matches
Mail list logo