On Thursday, 23 June 2022 at 15:20:02 UTC, Jesse Phillips wrote:
On Wednesday, 22 June 2022 at 01:09:22 UTC, Steven
Schveighoffer wrote:
There are 3 situations:
1. field in json and struct. Obvious result.
2. field in json but not in struct.
3. field in struct but not in json.
I do a lot of
On Friday, 24 June 2022 at 03:03:52 UTC, Paul Backus wrote:
On Thursday, 23 June 2022 at 21:34:27 UTC, Ola Fosheim Grøstad
wrote:
On Thursday, 23 June 2022 at 21:05:57 UTC, ag0aep6g wrote:
It's a weird rule for sure.
Another slightly annoying thing is that it cares about
destruction order wh
On Thursday, 23 June 2022 at 21:34:27 UTC, Ola Fosheim Grøstad
wrote:
On Thursday, 23 June 2022 at 21:05:57 UTC, ag0aep6g wrote:
It's a weird rule for sure.
Another slightly annoying thing is that it cares about
destruction order when there are no destructors.
If there are no destructors th
On Wednesday, 22 June 2022 at 12:42:48 UTC, Steven Schveighoffer
wrote:
On 6/22/22 2:05 AM, monkyyy wrote:
On Monday, 20 June 2022 at 13:20:51 UTC, Steven Schveighoffer
wrote:
And you can also use an inner struct to define overloaded
functions.
I believe templates make a better bandaid
```d
v
On Thursday, 23 June 2022 at 08:12:32 UTC, CrazyMan wrote:
linking
make sure you use the -i flag when compiling
On Thursday, 23 June 2022 at 21:05:57 UTC, ag0aep6g wrote:
It's a weird rule for sure.
Another slightly annoying thing is that it cares about
destruction order when there are no destructors.
If there are no destructors the lifetime ought to be considered
the same for variables in the same s
On Thursday, 23 June 2022 at 21:05:57 UTC, ag0aep6g wrote:
It means "may be returned or copied to the first parameter"
(https://dlang.org/spec/function.html#param-storage). You
cannot escape via other parameters. It's a weird rule for sure.
Too complicated for what it does… Maybe @trusted isn'
On Thursday, 23 June 2022 at 20:27:44 UTC, Ola Fosheim Grøstad
wrote:
On Thursday, 23 June 2022 at 19:38:12 UTC, ag0aep6g wrote:
```d
void connect(ref scope node a, return scope node* b)
```
Thanks, so the `return scope` means «allow escape», not
necessarily return?
It means "may be returne
On Thursday, 23 June 2022 at 12:48:20 UTC, test123 wrote:
https://forum.dlang.org/post/mkgelbxeqvhbdsukg...@forum.dlang.org
On Monday, 14 October 2019 at 20:13:43 UTC, jmh530 wrote:
On Monday, 14 October 2019 at 19:27:04 UTC, Andre Pany wrote:
[snip]
I found this tool https://github.com/gtkd-
On Thursday, 23 June 2022 at 19:38:12 UTC, ag0aep6g wrote:
```d
void connect(ref scope node a, return scope node* b)
```
Thanks, so the `return scope` means «allow escape», not
necessarily return?
But that only works for this very special case. It falls apart
when you try to add a third nod
On Thursday, 23 June 2022 at 16:08:01 UTC, Ola Fosheim Grøstad
wrote:
How am I supposed to write this:
```d
import std;
@safe:
struct node {
node* next;
}
auto connect(scope node* a, scope node* b)
{
a.next = b;
}
void main()
{
node x;
node y;
connect(&x,&y);
}
```
Erro
On Thursday, 23 June 2022 at 17:27:51 UTC, frame wrote:
On Thursday, 23 June 2022 at 16:16:26 UTC, vc wrote:
I've try this '\0'*10 and didn't work, i want the results be
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
One way:
```d
import std.range;
repeat("\0", 10).join("");
```
If you just need
On Thursday, 23 June 2022 at 16:16:26 UTC, vc wrote:
I've try this '\0'*10 and didn't work, i want the results be
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
One way:
```d
import std.range;
repeat("\0", 10).join("");
```
On Thursday, 23 June 2022 at 08:12:32 UTC, CrazyMan wrote:
I have a separate library and some template interface in it
```d
interface IFoo(T)
{
void setValue(const(T) value);
}
```
But when using it in the main program, it throws a linking
error. I found that you can make a sourceLibrary
I've try this '\0'*10 and didn't work, i want the results be
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
How am I supposed to write this:
```d
import std;
@safe:
struct node {
node* next;
}
auto connect(scope node* a, scope node* b)
{
a.next = b;
}
void main()
{
node x;
node y;
connect(&x,&y);
}
```
Error: scope variable `b` assigned to non-scope `(*a).next`
On 6/23/22 11:20 AM, Jesse Phillips wrote:
On Wednesday, 22 June 2022 at 01:09:22 UTC, Steven Schveighoffer wrote:
There are 3 situations:
1. field in json and struct. Obvious result.
2. field in json but not in struct.
3. field in struct but not in json.
I do a lot of reading JSON data in C
On Wednesday, 22 June 2022 at 01:09:22 UTC, Steven Schveighoffer
wrote:
There are 3 situations:
1. field in json and struct. Obvious result.
2. field in json but not in struct.
3. field in struct but not in json.
I do a lot of reading JSON data in C#, and I heavily lean on
optional over req
https://forum.dlang.org/post/mkgelbxeqvhbdsukg...@forum.dlang.org
On Monday, 14 October 2019 at 20:13:43 UTC, jmh530 wrote:
On Monday, 14 October 2019 at 19:27:04 UTC, Andre Pany wrote:
[snip]
I found this tool https://github.com/gtkd-developers/gir-to-d
from Mike Wey which translates GObject
I have a separate library and some template interface in it
```d
interface IFoo(T)
{
void setValue(const(T) value);
}
```
But when using it in the main program, it throws a linking error.
I found that you can make a sourceLibrary that copies the code
instead of creating a binary. But with
20 matches
Mail list logo