Stream: beginners

Topic: Principal decidable type inference


view this post on Zulip Nick Hallstrom (Jan 16 2023 at 19:25):

Hello! I recently stumbled across Roc and am liking what I’ve seen so far. One of the most interesting things to me is how it’s statically typed but type annotations are completely optional. I heard it referenced as “principal decidable type inference”. Is this something that’s unique to Roc? I’ve never heard of any other language like this.

view this post on Zulip Martin Stewart (Jan 16 2023 at 19:26):

Elm is another language with this and I believe also Haskell (I've heard it go by the name global type inference)

view this post on Zulip Folkert de Vries (Jan 16 2023 at 19:28):

haskell has type inference, but it's not (in general) decidable

view this post on Zulip Folkert de Vries (Jan 16 2023 at 19:28):

but in most programs that you'd actually write it's very similar to what elm and roc give you


Last updated: Jul 06 2025 at 12:14 UTC