User loginNavigation |
GADTs in a dynamically type-checked language?I've been reading papers about Ωmega, and I'm very fascinated by them. At the same time, I'm invested in untyped, dynamically type-checked programming. I'm not sure I want to give it up - it has some conveniences in interactive programming that I consider essential. But is there actually a reason why GADTs wouldn't work in a dynamically type-checked language? FGJω and an extension of C# show that you can encode (some?) uses of GADTs once you have type operators/higher kinds or equational type constraints, respectively. Couple that with exact runtime types as in the CLR and it seems to me that theoretically you could enforce GADT properties even in a dynamically type-checked language. Now, you might ask, what's the point? Let's take the type-safe AST evaluator (yeah, I know... ;)). Well, of course, you'd lose the ability to prevent the construction of ill-formed AST objects at compile-time, but you'd still have these guarantees at run-time. And that would be an improvement over plain dynamically type-checked languages, no? By Manuel J. Simoni at 2010-09-14 02:38 | LtU Forum | previous forum topic | next forum topic | other blogs | 6009 reads
|
Browse archives
Active forum topics |
Recent comments
1 week 1 day ago
41 weeks 3 days ago
41 weeks 3 days ago
41 weeks 3 days ago
1 year 11 weeks ago
1 year 15 weeks ago
1 year 17 weeks ago
1 year 17 weeks ago
1 year 20 weeks ago
1 year 24 weeks ago