C is Brittle D is Plastic
Kapendev
alexandroskapretsos at gmail.com
Sun Mar 22 16:49:35 UTC 2026
On Sunday, 22 March 2026 at 16:32:25 UTC, Sergey wrote:
> This is wrong example Kap.
>
> Imagine you have a function.. with many rows.
> And then you a calling another function there like:
> ```d
> // ... many rows above
> another_func(foo.bar, foo.baz, x);
> // ... many rows below
> ```
>
> here for x parameter you need to give a reference to foo. But
> you don't know which type foo now - is it a pointer or not..
> You will have to go somewhere above search the foo somewhere -
> then go back to another_func and change the x..
You will get a compiler error telling you the type.
It's the same thing.
More information about the Digitalmars-d
mailing list