Memorytaco / t-lang

This is now an experimental prototype of a system programming language based on MLFe type system.
1 stars 1 forks source link

craft pattern compiler derived from decision tree #15

Open Memorytaco opened 1 year ago

Memorytaco commented 1 year ago

One modern feature for language is pattern matching and we want to include it in compiler as soon as possible. However this is not a trivial feature even after we have a quite low level representation of code.

To compile a pattern matching statement, we need to craft something to convert patterns into decision trees first and then employ some algorithm to generate code testing and branching.

Memorytaco commented 1 year ago

Luckily, we have a start point from this hackage library pattern-matcher. And yes, we have a paper as companion.