How can I signal a master object that a resource handle is no longer used, from within the resource class's destructor?

2025-06-24 Thread realhet via Digitalmars-d-learn
Hi, I started to make a resident texture class, it just holds a TexHandle (an int). I it's destructor, I try to notify the outer world in a thread safe way that that the handle is no longer in use. I know that in the ~this() I have restricted options. I tried to do this with a simple queue ob

Re: Operator Overloading - Only for Classes and Structs?

2025-06-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, June 23, 2025 9:56:15 PM Mountain Daylight Time Andy Valencia via Digitalmars-d-learn wrote: > I was a little surprised the subclassing syntax didn't do > structural concatenation for struct's. That is, > > ```d > import std.stdio : writeln; > > struct A { > int a; > void printA()

Re: why can't I use --eval and pass a file at same time?

2025-06-24 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 25/06/2025 7:57 AM, Neto wrote: On Tuesday, 24 June 2025 at 19:06:17 UTC, Richard (Rikki) Andrew Cattermole wrote: That version of rdmd must be quite old, I can't find that message in its source. https://github.com/dlang/tools/blob/master/rdmd.d#L193 I've just downloaded it. I'm using rdm

Re: why can't I use --eval and pass a file at same time?

2025-06-24 Thread Neto via Digitalmars-d-learn
On Tuesday, 24 June 2025 at 19:06:17 UTC, Richard (Rikki) Andrew Cattermole wrote: That version of rdmd must be quite old, I can't find that message in its source. https://github.com/dlang/tools/blob/master/rdmd.d#L193 I've just downloaded it. I'm using rdmd build 20200216 on wslinux and on

Re: why can't I use --eval and pass a file at same time?

2025-06-24 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
That version of rdmd must be quite old, I can't find that message in its source. https://github.com/dlang/tools/blob/master/rdmd.d#L193

Re: Operator Overloading - Only for Classes and Structs?

2025-06-24 Thread Lance Bachmeier via Digitalmars-d-learn
On Monday, 23 June 2025 at 10:14:25 UTC, Jonathan M Davis wrote: D has done a number of things with overloaded operators to try to minimize the ability to do what many consider to be overloaded operator abuse (e.g. using using overloaded operators to define a DSL - or really much of anything t

why can't I use --eval and pass a file at same time?

2025-06-24 Thread Neto via Digitalmars-d-learn
why can't use do something like this? ```d import std.stdio : writeln, writefln; void main() { writeln("Hello"); } ``` and pass a file like: rdmd aa.d --eval="write(\"hello\");" returns ``` object.Exception@rdmd.d(193): Cannot have both --eval and a program file ('eval.d'). -

Re: Operator Overloading - Only for Classes and Structs?

2025-06-24 Thread monkyyy via Digitalmars-d-learn
On Monday, 23 June 2025 at 19:00:34 UTC, matheus wrote: In fact this restriction is good in fact. Stockholm syndrome