News for hackers. Stuff that matters.
Re:Pattern Matching with TypeScript by skybrian on Wednesday July 05, 2017 @11:24AM (#14703121)
The last example is a classic visitor pattern. The earlier ones (using structs of functions) are a variation on this that seems a bit closer to the spirit of pattern matching.
Re:Pattern Matching with TypeScript by swissmanu on Thursday July 06, 2017 @04:48AM (#14708968)
hi, i am the author of the article.

> The last example is a classic visitor pattern

you are absolutely right about the visitor pattern. will add the specific reference to the pattern in a revised version.

thanks for pointing out!