2 ms·
I used to believe this, but what I discovered is that edit-time/compile-time/run-time phases are not as important as failing quickly in absolute time. If I spo
by kybernetikos 11y ago
I used to believe this, but what I discovered is that edit-time/compile-time/run-time phases are not as important as failing quickly in absolute time.
If I spot my error during compile-time in scala and only during run-time in javascript that is still a win for javascript if I found the error 1 second after writing it in javascript because that's how long the page takes to load as opposed to 5 seconds in scala, because that's how long sbt takes to compile.
Absolute time to discover the failure from writing it is important, not the phases that the error is discovered in, and despite this article, I still find that on complex project structures sbt/scala is horribly slow.
- incepted 11y agoYou're assuming that you, the developer, will find the bug. You won't. Your users will. In production. Statically typed languages make sure you don't ship with that kind of buggy code.
- kybernetikos 11y agoThis is not an assumption, it's an experience. Code shipped to users. In production. In both Scala and Javascript bugs got through, both required specific practices to try to minimise them; with those practices, I found many bugs in the javascript code extremely quickly. None of the bugs in the scala code were found quickly because the iteration cycle is poison (bear in mind, our code base was probably a worst case and may not be representative of scala in general). I'm now firmly of the opinion that static vs dynamic typed is a sideshow, the real value is shifting as many errors as possible to as early as possible (in terms of seconds from typing the error to finding it) by whatever means you can, and a powerful type system is one tool for doing this, but if it compromises the iteration cycle and actually shifts the discovery of errors later in time then it's undermined one of the major reasons for using it.