On Wednesday, February 22, 2017 at 4:45:01 PM UTC+1, Rupert Smith wrote: > > On Wednesday, February 22, 2017 at 3:06:51 PM UTC, steenuil wrote: >> >> I remember reading about behavioural types ( >> http://www.behavioural-types.eu/), I don't fully understand them but I >> think this problem could possibly be a good fit for them? Not that there's >> any language that implements them yet. >> > > Looks interesting. I think a lot of that is to do with communicating > distributed systems? Everything is single threaded in Elm, so it should be > less complex. I think there is some kind of algebra that can be used to > describe the states, and rules to manipulate them to simplify state > machines and so on. Along these lines: > https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspondence >
>From what I understood, behavioural types are supposed to encode a program's behavior towards a resource in the type system. For example, a File's behavioural type could be "open -> read | write -> close", so that reading from a file that hasn't been opened yet, opening a file twice or forgetting to close a file would be a type error. So they can can be as useful to distributed systems as to anything else, really. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
