News for hackers. Stuff that matters.
Re:The Hamler Programming Language by tomp on Thursday June 11, 2020 @04:16PM (#23492906)
I'm not an expert either, but I think it basically comes down to 3 things:

1. typing messages - this is basically trivial, you can either create a specific ADT for all the acceptable messages, or you can type messages in a "general" way as `(string, list[any])` or similar (provided that your language supports `any`)

2. typing of acceptable messages - that's way harder, as you need to model state in the typesystem - imagine "does this variable represent an open or closed file handle" and then updating that as the code calls `open`, `read` and `close` appropriately... Rust's borrowing is a simple example of that as well

3. regardless of (2), you need to figure out what to do with unacceptable messages - in a dynamically typed language like Erlang, I imagine those can happen anytime - but then even dynamic languages need to deal with "this process doesn't accept this message" so ...

this is the only mention that I found in Hamler's documentation about messages, so I'm guessing they're using the ADT approach mentioned in (1)

https://github.com/hamler-lang/documentation/blob/master/gui...

Re:The Hamler Programming Language by tutfbhuf on Friday June 12, 2020 @03:10AM (#23496822)
> 2. typing of acceptable messages - that's way harder, as you need to model state in the typesystem - imagine "does this variable represent an open or closed file handle" and then updating that as the code calls `open`, `read` and `close` appropriately...

I think that would be a good use case for Dependent Types.