Re: Detect uninitialized class var access

2022-09-26 Thread wjoe via Digitalmars-d-learn
On Sunday, 25 September 2022 at 02:10:00 UTC, Salih Dincer wrote: On Saturday, 24 September 2022 at 13:17:19 UTC, rassoc wrote: Recently I refactored some old code of mine, now utilizing classes instead structs, and I got hit by an uninitialized variable access pattern similar to the simplified

Re: Detect uninitialized class var access

2022-09-26 Thread rikki cattermole via Digitalmars-d-learn
Currently in D you would be forced to create a vtable struct manually. But if we had something like signatures you could do this: ```d struct Foo { //... } struct Bar { InputRange input; } void doIt() { Bar bar; Foo* foo = new Foo; bar.input = foo; } ```

Re: Detect uninitialized class var access

2022-09-26 Thread wjoe via Digitalmars-d-learn
On Monday, 26 September 2022 at 16:51:11 UTC, rikki cattermole wrote: Currently in D you would be forced to create a vtable struct manually. Or I could just use classes. The cure shouldn't be worse than the disease. But if we had something like signatures you could do this: ```d struct Foo {

Is there a way to mark a dub package as linux only?

2022-09-26 Thread Christian Köstlin via Digitalmars-d-learn
Or posix only? Or not windows? Kind regards, Christian