4 ms·
Given a static type system that constrains the kinds of messages you can send, their arguments, and their response types, how is this meaningfully different fro
by ar-nelson 6y ago
Given a static type system that constrains the kinds of messages you can send, their arguments, and their response types, how is this meaningfully different from normal method calls? My understanding is that message-passing only starts to have interesting consequences when you do dynamically-typed things.
- weatherlight 6y agoyou could design the mailbox to accept all messages, how the object handles those messages is a separate concern, you could use something like multiple dispatch to then decide which method on the object gets the message. Gleam is a statically typed language on the BEAM, early implementations the messages between processes were not typed, Im not sure if that still the case. Pony is a OO language thats based on the Actor model that has a strong static type system, where typed message passing is central to the language.