dart-lang / dart-lang/language
Are we thinking about an alias for if null and if not null?
Open
Nobody has claimed this yet.
request
- Dominant language
- TeX
- Stars
- 2.9k
- Forks
- 239
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 14
Description
Sorry if already posted, I just couldn't find anything related.
What about a shorthand to if (foo == null) and if (foo != null)?
Maybe some simple stuff like
if (foo?) // same as foo == null
if (foo!) // same as foo != null
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the proposed ? and ! aliases in the issue and reviewing the existing comment thread for prior discussion. Identify the language specification and implementation entry points affected by adding null-check syntax; done means reaching and documenting a settled design decision, including semantics and any required tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100