dotnet / dotnet/vblang

[Proposal] Add "With Each" blocks

Open
#53 0 comments 1 reaction 0 assignees View on GitHub
Discussion
Dominant language
No language data
Stars
328
Forks
71
PR merge metrics
No merged PRs in 30d

Description

VARIANT 1:

```
With Each in SomeEnumerable
Console.Writeline($"Yo {.Name}")
End With
```

VARIANT 2:

```
With Each juniper in SomeEnumerable
EngageRoquefort(juniper)
Console.Writeline($"This {.Quip} is {.Bitness}")
End With
```

With blocks offer a distinct advantage over C# for many of our projects that contain large object graphs. The syntax above adds readability over the current "For Each x in y" / "With x" / (statements) / "End With" / "Next" pattern.

I'd love to see some of the With-centric enhancements get some real consideration.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.