Implementation of Coalton like trait library in Julia

I was looking at the Coalton library in CL and I was quite impressed by what they have achieved in terms of getting an opt-in Haskell like typeclass system in Common Lisp.

Since traits and type-stability has been one of the major thrust in Julia, both for performance as well as correctness, I was wondering if it might be possible to implement such a library in Julia or is there something similar already in the works.

Out of curiosity - what is the allure of this?

Is it a “static compilation checker” you want akin to Rust, where it lets you know if there is errors in types etc before execution?

Kind regards

Well it wont be Rust level borrow check but yes it would lead to introduction of Trait based static system.

It wont directly help the compiler but by ensuring type stability of the final code, would enable very high optimization.

By introducing a trait system would also allow the development of an interface system that can allow more correct interfacing between different libraries.

1 Like