Detect uninitialized class var access

wjoe invalid at example.com
Mon Sep 26 18:28:14 UTC 2022


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 {
> 	//...
> }
>
> struct Bar {
> 	InputRange input;
> }
>
> void doIt() {
> 	Bar bar;
> 	Foo* foo = new Foo;
> 	bar.input = foo;
> }
> ```

This would be nice but since we don't it doesn't really matter. 
unfortunately.


More information about the Digitalmars-d-learn mailing list