Detect uninitialized class var access

rikki cattermole rikki at cattermole.co.nz
Mon Sep 26 16:51:11 UTC 2022


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;
}
```

Classes are not the only way to do OOP :)



More information about the Digitalmars-d-learn mailing list