
Bringing Pattern Matching to TypeScript / ts-pattern lib
With the emergence and wide adoption of libraries such as React, Redux or XState, in the last few years the frontend ecosystem has shifted from an imperative to a declarative programming model. Now that we have realised how much easier it is to reason about declarative code and how many bugs are ruled out by embracing this paradigm, there is simply no going back.
Yet, Javascript and TypeScript weren’t designed for this paradigm, and these languages are lacking a very important piece of the puzzle: declarative code branching.
This talk will demonstrate how we can write conditional logic that is easy to read and maintain using ts-pattern, a Pattern Matching library for TypeScript.
Speaker: Gabriel Vergnaud / twitter.com/GabrielVergnaud
Gabriel is a data visualisation software engineer @ Datadog passionate about application architecture, programming language design and colouring pixels.
Frontend RheinMain is a community-hub for frontend devs and friends in RheinMain. Our misson is to push knowledge transfer and connect webworkers by running meetups and livestreams and supporting related initiatives. We enable developers connect with other webworkers, to learn new stuff and get inspired by latest developments in the frontend field.
www.frontend-rheinmain.de/
#typescript #javascript #patternmatching #frontendrm #meetup #frontend #rheinmain
Intro: 0:00
Datadog Livedemo: 6:31
Talk: 14:59
Q&A: 55:17
Resources:
ts-pattern:
github.com/gvergnaud/ts-pattern
Introducing TS-Pattern v3.0:
dev.to/gvergnaud/bringing-pattern-matching-to-type…
コメント