We now have the beginnings of type inference

GitHub - tekknolagi/scrapscript: A functional, content-addressable programming language. now has optional type inference. If the type inference is enabled, compiled scraps might get faster (they will not get slower). It doesn’t support every feature but it does support functions and records and lists and simple types. Looking forward, we’d like to get the following working in the near future:

  • Polymorphic variants (a la OCaml)
  • Type annotations
  • Defer-dynamic, so that we can admit programs that HM might not like as long as they have run-time type checks

That’s all for now. Thanks!

2 Likes