dotnet / dotnet/vblang

Proposal: Support for Return? construct

Open
#167 8 comments 4 reactions 0 assignees View on GitHub
LDM Reviewed: No plans
Dominant language
No language data
Stars
328
Forks
71
PR merge metrics
No merged PRs in 30d

Description

This would be a convenience/delighter to clean things up a bit.

`Return? x` would simply return x if x is not nothing and would proceed if x is nothing.

Example:

*** AS-IS NOW ***
```
Dim res = ResolveRoute(c, d, r)

If res IsNot Nothing Then
Return res
End If

'do something else
```

*** PROPOSED ***
```
Return? ResolveRoute(c, d, r)

'do something else
```

Just a simple one in the name of efficiency!

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.