5 days ago DIP Ideas » Re: Struct inheritance | |||
|---|---|---|---|
| |||
...struct Child : Dad {
}
```
(I'm not sure if the scheme I mention does, I'd... | |||
5 days ago DIP Ideas » Re: Struct inheritance | |||
|---|---|---|---|
| |||
...of adding such to the betterC subset. If one wants classful behaviour in betterC, then... | |||
5 days ago DIP Ideas » Re: Struct inheritance | |||
|---|---|---|---|
| |||
...think adding it for structs is appropriate. If you don't need multiple parents, then... | |||
5 days ago DIP Ideas » Re: Struct inheritance | |||
|---|---|---|---|
| |||
...something(/* ... */)
{
struct Foo *foo = something_returning_Foo(/* ... */);
if (!lockit(foo) {
/* some error handling */
}
...
}
```
Where the... | |||
5 days ago General » Re: Something like ADL from C++? | |||
|---|---|---|---|
| |||
...alias this' is it intended to preserve? If only the implicit conversion, then a new... | |||
5 days ago General » Re: Something like ADL from C++? | |||
|---|---|---|---|
| |||
...You could call the right `serialize` directly if one exists in the type's module... | |||
5 days ago General » Re: Something like ADL from C++? | |||
|---|---|---|---|
| |||
...traits : isNumeric;
string serialise(T)(T foo)
if(isNumeric!T)
{
import std.conv : to;
return... | |||
5 days ago General » Re: Something like ADL from C++? | |||
|---|---|---|---|
| |||
...to static foreach".
template serialiseOf(T)
{
static if (is(__traits(parent, T) == module) && isUserType!T... | |||
5 days ago Learn » Re: maybe a noreturn issue | |||
|---|---|---|---|
| |||
...ostensibly 'useless constructs', such as unused parameters, if (0), strongly pure functions returning void etc... | |||
5 days ago Learn » maybe a noreturn issue | |||
|---|---|---|---|
| |||
Not sure if that should compile
```d
int f()
{
while (true) {}
}
```
What I observe and... | |||
Copyright © 1999-2021 by the D Language Foundation