June 20, 2022
Is there any way to define variables in an outer scope from an inner scope?  I was thinking

```d
void main()
{
    int .y = 3;
}
```
would work, but it doesn't.
June 21, 2022
On Monday, 20 June 2022 at 13:56:04 UTC, Ruby The Roobster wrote:
> Is there any way to define variables in an outer scope from an inner scope?  I was thinking
>
> ```d
> void main()
> {
>     int .y = 3;
> }
> ```
> would work, but it doesn't.

No and it would only lead to bugs.

If you have access to an inner scope then surely you have access to the outer scope and can just add the variable there.

If you need to add a variable in a nested scope, then surely you're solving a problem with the wrong solution.