fsharp / fsharp/fslang-suggestions

Introduce the ?. operator into F#

Open
#14 170 comments 38 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
373
Forks
21
PR merge metrics
No merged PRs in 30d

Description

**Submitted by John Azariah on 11/23/2015 12:00:00 AM**
**16 votes on UserVoice prior to migration**

Since we allow the . operator to reference fields and properties of objects in F#, we're faced with the same problem of null checking that plagued C# until C# 5.

The C# 6 'elvis' operator propagates nulls in a succinct way, and I think that working with objects in F# will be similarly simplified if we introduce it here as well!

**[Original UserVoice Submission](https://fslang.uservoice.com/forums/245727-f-language/suggestions/10837866)**
[Archived Uservoice Comments](../tree/master/archive/suggestion-10837866-introduce-the-operator-into-f.md#comments)

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.