4 ms·
I may be missing some context but can't it be done similar to how we handle data from outside world in TS ? A runtime type guard that asserts that the shape of
by lf-non 6y ago
I may be missing some context but can't it be done similar to how we handle data from outside world in TS ?
A runtime type guard that asserts that the shape of data conforms to a particular type and from that point forward compiler will trust the guard and assume that the message is of particular type.
In a dynamically typed world, I doubt one could do much better.
- tluyben2 6y agoThe thing is; messages for Erlang are far more part of your programming/architecture than in other languages. You are basically writing 'nanoservices' all the time. I saw quite a lot of people mentioning it in discussions, including here, for instance [0]. [0] https://news.ycombinator.com/item?id=22573535 https://news.ycombinator.com/item?id=22573535