HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
TartanLlama
optional
C++2018–2023
TartanLlama / optional

optional

C++11/14/17 std::optional with functional-style extensions and reference support

2Distinct people
2Mentions
0Explicit recommenders
926GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

C++11/14/17 std::optional with functional-style extensions and reference support

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, 3:56:07 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 year2 dated mentions

Observed mentions: 2018-05-10 09:59:55 UTC to 2023-08-14 04:31:03 UTC.

012018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023

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
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC101
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101

What Hacker News says

2 sources
I quite like the option of being able to program in a more functional style in C++. If you have the cycles to spare, or a sufficiently smart compiler and it allows you to say more with fewer keystrokes and better readability then why not? I haven't used it yet, but C++ Streams[1] is a header-only library that appears to have great ergonomics and an API that will feel familiar for those who know Java Streams. Since I haven't had the luxury of being able to use C++20 yet, I was unfamiliar with the ranges library. Starting at 1:06:00 you can see some motivating examples for those and they look great to me. Much easier to read than the equivalent STL. The libraries mentioned in the video TartanLlama/optional[2] and TartanLlama/expected[3] clearly demonstrate the value proposition (brevity and clarity) on their github pages. [1] http://jschein
Read the rest
In Functional Programming in Modern C++: The Imperatives Must Go [video]
Smart pointers have been an evolution, C++11 deprecated auto_ptr (gone in C++14), make_unique only came up C++14 due to an oversight on C++11, C++17 constructor type deduction makes everything more productive. Regarding memory and performance improvements std::string_view should better than using std::string, but don't go overboard replacing all code. It depends what kind of application you are writing, the age of existing code, or sometimes a plain old const reference might be enough. There are some ongoing efforts for such chaining http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p079... https://github.com/TartanLlama/optional EDIT: corrected the make_unique/make_shared misinformation.
In How to Adopt Modern C++17 into Your C++ Code [video]

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.