by dkarl · 15y ago · 0 comments
Aside from that one advantage, though, it's the same with types or without them. For a module as a whole, the compilation dependencies that exist in a typed language are the same as the runtime dependencies that exist in an untyped language. Whether you're using a typed or untyped language, you can write whatever code you want, but you can't do anything with it until you satisfy its dependencies. With that one exception, of course: in an untyped language, you can run code that doesn't depend on the missing APIs but happens to be in the same module as code that does depend on them.
Overall, I don't think that amounts to much, especially compared to a typed language like Scala where you can copy snippets into a REPL. Or even better, Ensime is an Emacs mode that is supposed to let you work with Scala the way Slime lets you work with Common Lisp. (I haven't tried it myself yet, but it exists, and people are using it for real work.)
"We have given a complete program, but Epigram can also typecheck and evaluate incomplete programs with unfinished sections sitting in sheds, [···], where the typechecker is forbidden to tread. Programs can be developed interactively, with the machine showing the available context and the required type, wherever the cursor may be. Moreover, it is Epigram which generates the left-hand sides of programs from type information, each time a problem is simplified with ⇐ on the right."
Update: Aarghh, it's just aggravating to read an academic stirring up the pot over some point of theoretical purity. And I love theory too. ;-)
And I understand why this behavior would be unwanted in production systems.
http://news.ycombinator.com/item?id=2622491
This argument is also applicable to your concrete example, and explains how you can achieve modularity in a strongly typed language even in that case. The type system just has to be flexible enough to allow for module functors.
In other words, the original article's argument holds only for strongly typed languages whose type system is too primitive.
So this advantage is about writing code that isn't intended to be compiled or run yet. I can do that in a statically typed language too: I just put the code in a comment block.
Or am I missing something here?