no one writes JavaScript anyway.. ReScript: the ReasonML successor

Опубликовано: 29 Май 2024
на канале: Michigan TypeScript
8,256
188

ReScript is a robustly typed language that compiles to efficient and human-readable JavaScript. It comes with a lightning fast compiler toolchain that scales to any codebase size.

If you’re using a compiler and build step, you aren’t writing the code your users are running in the browser. If you need to “build” your web application, writing JavaScript is a choice. ReScript’s syntax allows developers to write type-sound, expressive, and readable code that still compiles to performant JavaScript, without the need for additional runtime libraries like Immer, ts-pattern, or rambda. If you’ve been keeping an eye on tc39 proposals, ReScript has features that have been stuck in tc39 proposals for years: do expressions, pattern matching, the Pipe Operator, and Record & Tuple values.

Rob Meyer is a Staff Software Engineer at Autobooks, working on enabling small and medium businesses to get paid. He's been attempting to squash TypeErrors using functional programming since 2015. In his spare time, he likes to play games and collect O'Reilly books that won't be read.

00:00:00 in this episode
00:02:26 a tour of ReScript
00:08:44 we all compile to JavaScript anyway
00:10:09 criticisms of TypeScript
00:13:47 about ReScript
00:20:19 variants
00:24:26 nominal types
00:29:22 immutable by default
00:30:35 everything is an expression
00:32:16 JSX is built in
00:34:21 pattern matching (the best feature)
00:39:15 the pipeline operator (!!!)
00:41:11 what was the learning curve like for your team?
00:44:34 incrementally adoptable
00:46:26 how do you decide which things to convert first?
00:50:35 an alternative to throwing in promises (a Result type)
00:54:00 what's a raw?
00:55:51 any issues using NPM packages?
00:59:10 why is it so fast? (compared to TypeScript)
01:00:57 looking at the compiled output
01:01:51 how do tests look?
01:03:04 what's ReasonML as compared to ReScript?
01:04:18 what's the interop with TypeScript like?
01:08:42 how does this interact with other assets like CSS/images/etc
01:10:48 what about formatting (like prettier/biome/etc)

Twitter:   / mitypescript  
Mastodon: https://fosstodon.org/@MichiganTypeSc...
BlueSky: https://bsky.app/profile/michigantype...
Threads: https://www.threads.net/@michigantype...
Instagram:   / michigantypescript  
TikTok:   / michigantypescript  
Discord: https://discord.michigantypescript.com
GitHub: https://github.com/MichiganTypeScript
SoundCloud:   / michigan-typescript  


Смотрите видео no one writes JavaScript anyway.. ReScript: the ReasonML successor онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Michigan TypeScript 29 Май 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 8,25 раз и оно понравилось 18 людям.