What language should I learn? Typescript.
This answer is becoming more and more absolute for me.
As I explored some new libraries and patterns this week, it never stops surprising me how extensive is the Typescript ecosystem, and how much can you do with it (TLDR anything ๐คฏ)
Did you know you can create games with Typescript? ๐ I used @excaliburjs with @EffectTS_ to setup a game scene, all Typescript ๐ฅ Add XState @statelyai as well for next level results ๐ And it's all just Typescript โจ
This is what I discovered ๐
Always bet on "it's just Typescript"
Typescript runs everywhere: client, server, mobile, desktop, iot.
Result: When a library is pure Typescript, such library can be used everywhere, in any project
Don't be scared, @EffectTS_ is just typescript ๐๐ผโโ๏ธ That's what makes it great ๐ฅ It's easy to convert values and functions to Effect, sync, async, error handling, and more ๐๐ฅ
This thought came out as people started considering Effect a "different language".
It's not. It's just Typescript. And that's exactly what makes it so powerful ๐ฅ
Make games with Typescript
If I can use Typescript for anything, how about games? ๐ค
Turns out that you can (of course ๐๐ผโโ๏ธ).
I tried a library called excaliburjs.
What's more, since all Typescript libraries can work together, why not use Effect at the same time?
Turns out that you can (of course ๐๐ผโโ๏ธ).
Did you know you can create games with Typescript? ๐ I used @excaliburjs with @EffectTS_ to setup a game scene, all Typescript ๐ฅ Add XState @statelyai as well for next level results ๐ And it's all just Typescript โจ
I made games with every tool (Unity, Godot, Flutter, Constructor). Looking forward to try a full game also in Typescript with excaliburjs ๐
There is more ๐คฉ
Timeless coding principles, practices, and tools that make a difference, regardless of your language or framework, delivered in your inbox every week.
Actor model: yes you can in Typescript!
Another rabbit hole I explored this week is XState.
Wait, again? Yes.
I have been talking about XState a lot in the past, but it turns out there is still more to discover ๐
Actors in XState v5 are insane ๐ฅ @statelyai Isolate state machines logic and emit events to interact between them ๐ ๐ `spawn` machines ๐ `emit` events from spawned machine ๐ Subscribe `on` events in root machine
XState v5 makes actor-to-actor messaging a breeze. This allows to implement state machines in isolation and communicate between them by sending events.
XState also allows to access each machine context with ease, everywhere you have an actor ๐ช
There is even more ๐ `useSelector` allows to access the internal context of a spawned actor ๐ช All type safe and performant ๐ค
Actors in XState v5 are insane ๐ฅ @statelyai Isolate state machines logic and emit events to interact between them ๐ ๐ `spawn` machines ๐ `emit` events from spawned machine ๐ Subscribe `on` events in root machine
Did you know that state machines are used extensively in games?
Since it's all "just Typescript", you can use XState with excaliburjs as well ๐
And much much more
For completeness, here is what you can also explore:
- Desktop apps: Tauri
- Mobile apps: React native
- Local first apps: Dxos
- Web & Server: Bun
- And pretty much any API everywhere provides a Typescript SDK ๐๐ผโโ๏ธ
SQL database queries using @EffectTS_ Connect, read and query your database in just a few lines of code ๐ฅ All type safe with complete resource management ๐ช
There is no doubt that Typescript is a safe bet ๐ค
You can then mix and match all the libraries in the ecosystem to build anything, at any scale.
And it's getting better and better ๐
See you next ๐