dotnet / dotnet/vblang

'Null' literal (as opposed to 'Nothing' literal)

Open
#94 10 comments 2 reactions 0 assignees View on GitHub
Proposal
Dominant language
No language data
Stars
328
Forks
71
PR merge metrics
No merged PRs in 30d

Description

This idea addresses scenario #95.

A new `Null` literal in VB which always evaluates to either a null reference or a null nullable value.

# Advantages

Would be more intuitive. Addresses the problem without changing the semantics of Nothing or the If operator.

# Drawbacks

There's no way to enforce this at run-time because there's no difference between a null reference created by `Null` and a null reference created by `Nothing`. All conversion run-time operators will continue to convert a null reference to the default value of the target type.

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.