claro-lang icon indicating copy to clipboard operation
claro-lang copied to clipboard

Implement Pattern Matching

Open JasonSteving99 opened this issue 2 years ago • 0 comments

I really don't feel that Exceptions serve to enhance the understandability of a program's flow of control. So I don't want to build Claro around exceptions. Instead, I think procedures should return error values in results so that programmers can directly check for success. This leads to some super gross code without pattern matching, so for this reason alone I find enough justification to implement pattern matching. As an incredible bonus, Claro will also get the incredible expressivity that pattern matching gives a language in the general case, not even considering error handling.

Should look something like Rust syntax: https://doc.rust-lang.org/book/ch18-03-pattern-syntax.html

JasonSteving99 avatar May 03 '22 00:05 JasonSteving99