Thanks for sharing your thoughts! It's quite reassuring to read your post as it sounds like we have had many of the same ideas about types and processes.
> One thing I did, but this may not work for Gleam, is to replace PIDs with just references to processes, and only allow obtaining such references by spawning a process.
This is my current plan, though it does make interop with Erlang/OTP somewhat more tricky. I'm going to have to redesign some of the behaviours there to make passing around references to processes possible.