3 ms·
Without a library like Coalton, the type system built into Lisp is pretty limited. (It feels pretty similar to C's.) So you can't[1] declare types like "list of
by reikonomusha 5y ago
Without a library like Coalton, the type system built into Lisp is pretty limited. (It feels pretty similar to C's.) So you can't[1] declare types like "list of foo" or "function that takes any type and returns the same type".
[1] There is something called a SATISFIES type which lets you turn any globally defined predicate function into a type, but I don't find that it's used widely in practice, because the compiler can't reason about it.
- wiz21c 5y agoNot sure if separating the language from its available libraries is really helpful...
- reikonomusha 5y agoIt is, because libraries like Coalton don't give you an expressive type system "for free", you also have to agree to write your code in a certain way. As such, it's completely reasonable for Lispers to opt out of using such opinionated libraries, and instead using only what's provided by the standard. If you do use a library like Coalton, then you get a type system pretty close to Haskell's.
- threatofrain 5y agoHey, do you use Coalton, and how mainstream would you say it is?
- gmfawcett 5y agoI'm fairly sure that their company created Coalton: https://coalton-lang.github.io/20211010-introducing-coalton/ https://coalton-lang.github.io/20211010-introducing-coalton/
- reikonomusha 5y agoIt's pretty new and not yet considered mainstream. But it's under active development and is used for real commercial projects.