|
|
|
|
|
by titzer
401 days ago
|
|
> You then have to compile, restart your program, rebuild the whole rigid structure, and confirm the change works as expected. This whole process can take many minutes. This is not my experience at all. Virgil is a fully statically-typed language and compiles fast. When working on the Virgil compiler (approximately 50KLOC), my typical workflow is to run the compiler in the interpreter in my debug, edit, run loop. The interpreter can load the entire compiler, typecheck it, and run it with my changes in 90 milliseconds. If we throw a complete optimized compile in the loop, it's 400 milliseconds. It takes me longer to switch between my two terminal tabs. It's not static typing versus dynamic typing. It's ridiculously inefficient languages/build systems versus efficient ones. |
|
There are many statically typed languages that can compile in under a second. But when you change any function signature, you still have to ensure every caller is fixed. You then have to recompile, restart the application and rebuild all the data structures. Some static languages allow for hot reloading in interpretive mode, but the types of changes allowed are limited.
In dynamic languages like Common Lisp and Smalltalk you can update the program while it is running. The speed of iteration is 100x faster, because you don't have to restart the application and rebuild all the data structures to get to the point where you can test your change.