Svelte Hacker News logo
  • top
  • new
  • show
  • ask
  • jobs
  • about

Show HN: Sum Type and Type Matching in C

github.com

2 points by brightprogramer 20 hours ago

Previous thread : https://news.ycombinator.com/item?id=45145176

Tried to implement a best effort pattern patching inspired solution in C. Destructuring not available, and nesting not directly available, but both can be achieved by opening more Match-When blocks. I guess we can say this is almost pattern matching in C.