logoalt Hacker News

onlyrealcuzzo • yesterday at 11:35 PM • 2 replies • view on HN

> Of course there is Swift, Ocaml or Rust

Presumably C++ is the first thing you should mention.


Replies

stass • today at 4:11 AM

My list of other languages was not exhaustive, just like C++ matches. :-D

On a serious note, it's a fair point: it does have std::variant, std::visit and std::expected in C++23, but the do force you to embrace C++ verboseness: e.g. you have to write a per-case visitor for std::visit compile-time check. It also still lacks exhaustive matching, distinct types, and has a different ABI from C.

I felt like Swift/OCaml were closer in spirit to what I was trying to achieve in Type-C.

wffurr • yesterday at 11:56 PM

Which is famous for the ergonomics of variant and pattern matching...

➕ show 1 reply