HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
nlkl
Optional
C#2014–2018
nlkl / Optional

Optional

A robust option type for C#

3Distinct people
4Mentions
0Explicit recommenders
919GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A robust option type for C#

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year4 dated mentions

Observed mentions: 2014-12-09 15:41:59 UTC to 2018-11-09 13:13:50 UTC.

0122014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2018

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC110
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC000
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC101
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC000
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC211

What Hacker News says

4 sources
Once you get the hang of at least one programming language where nulls do not exist, you realize just how much unnecessary pain they cause. There are of course several ways to represent the absence of a value, fit for different paradigms and programming styles, but I think most of us can agree at this point that having untyped null values is a very bad idea in most cases. Whenever I program in C#, I always have to be overly paranoid, as more or less anything can be null. Option types certainly introduce some development overhead up front, by forcing the developer to handle the possibility of an absent value, but in my experience this is still far less than the amount of defensive programming necessary to handle nulls correctly. As a response, I decided to implement a practical and safety-focused C# option type, and now use it more or less
Read the rest
everywhere. Reference: https://github.com/nlkl/Optional Certainly, this does not guarantee that values are not null, but it allows you to be explicit about absent values in your own APIs, which is of great value. In turn, null checks become much easier as you do not have to accept nulls as legal values (except at boundaries to external code), and working with potentially absent values become much less cumbersome, due to a convenient API. Interesting things are happening to programming languages these days, and I am quite curious to see the next steps. The C# language team as well has some focus on this (https://github.com/dotnet/roslyn/blob/features/NullableRefer...).
In Maybe Null Is Not an Option

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.