3 ms·
Typescript's type system is Turing Complete (at least it was for 2.2) [0]. Regexes fundamentally can't do that [1]. [0] https://github.com/Microsoft/TypeScrip
by sn9 2y ago
Typescript's type system is Turing Complete (at least it was for 2.2) [0].
Regexes fundamentally can't do that [1].
[0] https://github.com/Microsoft/TypeScript/issues/14833 https://github.com/Microsoft/TypeScript/issues/14833
[1] https://en.wikipedia.org/wiki/Turing_completeness https://en.wikipedia.org/wiki/Turing_completeness
- hardwaregeek 2y agoA strict theoretical regex yes, but a lot of regex implementations in practice are not strict NFA/DFAs and may indeed be turing complete
- extraduder_ire 2y agoI think GP meant PCREs when they said regex. Ar at least the subset of them that doesn't embed perl code.