doudou / ducks

An attempt at type inference and static type checking in a duck-typed language (Ruby)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

= Ducks: a type-inference library in duck-typed languages

The goal of this library is to do as much type inference in the constraints of a duck-typed language.

The underlying assumption here is that one would not dynamically add/remove methods during the runtime of the program, only do metaprogramming at loading time. This means that one can infer class/module-to-method once the program is loaded. The type inference engine then tries to infer a possible list of class/modules that form the class of an object based on which messages this object should respond to.

This fails for very small programs, but as soon as we're dealing with decent-sized programs I hope it will become a completely different story.

About

An attempt at type inference and static type checking in a duck-typed language (Ruby)


Languages

Language:Ruby 100.0%