Comment on Show HN: A Lisp interpreter in C# 7parentComments−suzukiOP8yThank you. I appreciated especially the pattern matching feature of C# 7 while programming the interpreter. For example: /// <summary>Evaluate a Lisp expression in an environment.</summary> public object Eval(object x, Cell env) { try { for (;;) { switch (x) { case Arg xarg: return xarg.GetValue(env); case Sym xsym: try { return Globals[xsym]; } catch (KeyNotFoundException) { throw new EvalException("void variable", x); } case Cell xcell:
Comments
Thank you. I appreciated especially the pattern matching feature of C# 7 while programming the interpreter. For example: