Hacker News new | ask | show | jobs
by JonChesterfield 604 days ago
It's regular expressions via derivatives which is sanely representable in functional programming fashion. Matching a single string doesn't need the caching layers for termination, you could do this in C++ templates if you have the patience. Nice to see it in typescript syntax.
1 comments

Hana Dusikova did this in C++ several years ago, with her CTRE library.

https://github.com/hanickadot/compile-time-regular-expressio...

Of course, it has all the usual tradeoffs of compile-time template programming.

Also relevant Boost.Expressive, by Eric Niebler, from 2007.