Get the latest tech news

"Parse, don't validate" through the years with C++


Alexis King’s Parse, don’t validate had a huge impact on how I write code, particularly my stance toward Python type annotations in production. However, as someone who has written practically zero Haskell, the idea didn’t click for me until I started seeing other examples, like this one in Rust. This post explores how we can take this paradigm and apply it to a simple date-parsing problem in C++98, C++11, C++17, and finally C++23.

None

Get the Android app

Or read this on Hacker News

Read more on:

Photo of years

years

Photo of C++

C++

Photo of parse

parse

Related news:

News photo

Fujitsu Falls Most in 11 Years After Forecast Misses Estimates

News photo

Popular WordPress redirect plugin hid dormant backdoor for years

News photo

Kyoto cherry blossoms now bloom earlier than at any point in 1,200 years