Search

4 days ago
DIP Ideas »
(That was a bit iffy, try this one instead)



```D
import std.stdio;

void main...
4 days ago
DIP Ideas »
...what would your scheme do for the struct equivalent of this, assuming it is even...
5 days ago
General »
...arg)if(!is(T==struct)){ return [1]; }
```

```d
module user_code;
struct S{}
ubyte[] serialise...
5 days ago
DIP Ideas »
...protected int field;
    }

    struct Thing2 {
        private int field;
    }
    ```

    If we have struct inheritance, then it...
5 days ago
DIP Ideas »
...stringof);
    }
}
```

Will output:

```
Parent
Child
Parent
Child
```

Struct inheritance would have the same output.

There...
5 days ago
DIP Ideas »
...the exact in-memory layout of the struct so defined. Whereas AFAICT, the inheritance suggestion...
5 days ago
DIP Ideas »
I'm very wary of this, Walter is pretty against implicit conversions generally speaking. I...
5 days ago
DIP Ideas »
...struct in another, which is already possible.  So one could have:

```C
struct Foo;
struct...
5 days ago
DIP Ideas »
C++ classes work in -betterC.

Its not too difficult to implement down casting either.

https...
5 days ago
DIP Ideas »
...any form of classful behaviour (i.e. struct inheritance) in betterC, but that is obviously...
1 2 3 4 5 6
Next ›   Last »