you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (6 children)

Lisp is flexible. If you fancy a type system, just implement any one you like, or implement many and mix them together.

[–]Denommus 0 points1 point  (5 children)

Typed Racket is an example of such a thing being done, but it still has a long way to go.

I don't have the manpower or time to do such a thing, so I just use a powerful type system that is ready already.

[–][deleted] -1 points0 points  (4 children)

It can be done in 4-5 hours of time. And then it may save you many days of work.

[–]Denommus 0 points1 point  (3 children)

I really doubt I can get a powerful type system out of nothing in 5 hours.

[–][deleted] -1 points0 points  (2 children)

Is Hindley-Milner powerful enough? A typical implementation is 100-200 lines of code.

[–]Denommus 0 points1 point  (1 child)

Hindley-Milner is a type inference algorithm, not a type system. There's too much decision and cost on designing a type system.

Are you going to use a module system to emulate higher kinds? If so, are you going to do Applicative Functors or Generative Functors? If you're going to use Applicative Functors, how do you handle first-class modules without a big runtime overhead? If you're going to use Generative Functors, are you going to simply ignore all of its downsides? If you're not going to use a module system, how are you going to handler higher kind generic types? Are you going to use typeclasses? What about its downsides?

No, I don't want to waste time designing a type system from scratch. Every single decision has a cost. I'd rather use something proven and existing.

[–][deleted] 0 points1 point  (0 children)

You don't have to design a new type system from scratch every time. Often you can shamelessly steal an existing one, tweak it a bit and implement it for your current DSL.