5 ms·
Tools for interpreted dyntyped languages can be fast, helping the dev flow (edit-run-check) in those dyntyped langs to be fast. But those tools are then in wri
by cies 4y ago
Tools for interpreted dyntyped languages can be fast, helping the dev flow (edit-run-check) in those dyntyped langs to be fast.
But those tools are then in written in statically typed langs that do not have such fast dev flows (as they have an extra step: edit-COMPILE-run-check).
I wonder how we can have the best of both worlds. I see a glimpse of this using Kotlin: I can use the JVM to run in debug mode and have very fast compile times due to incremental builds and hot code reloads), then I can compile the code to "native" (binary) for production scenarios.
This way we can have strong type guarantees AND fast dev flows.
- yencabulator 4y agoThis is a false dichotomy. Plenty of Javascript projects build slower than a comparable Go project, because of webpack etc bloat and not caching results as well.
- cies 4y agoTrue that. But changing a few lines in and hot-reloading is simply not possible in case of compiled langs; that was what I was driving at. One could say JSX/TS/TSX are compiled langs too...
- yencabulator 4y agoErlang is a bytecode VM, so "compiled" for sure, and is pretty much the pioneer of hot upgrades. Plenty of Lisps and Schemes are compiled (though often to bytecode) and can typically dynamically replace parts of the program. I think ability to hot upgrade seamlessly is more a statement of "how much of the data structure shape is carried at runtime" / "how likely it is old and new API data structures happen to interoperate", and how likely it is that one can convert old runtime state to new runtime state. And that one can be seen as a trade-off; close to the metal control over memory layout is a performance gain, but in practice trades off this kind of flexibility (in theory you could make it work, but it's probably a lot of work). https://www.theseus-os.com/ https://www.theseus-os.com/ is an experimental kernel that can restart/reload/upgrade Rust components at ELF library boundaries. (State internal to a component has to be discarded unless you program a converter. Then again most JS web development hot reload discards internal state of a component.)
- cies 4y agoWell said. Though when you are in a dyn typed lang you accept many errors are runtime errors. Where in strongly typed langs you typically dont.
- cercatrova 4y agoDart does basically the same thing, as used in Flutter debug vs release builds. However, this requires people to switch to such a language. If they want to continue to use JS, then we can only provide tooling around it rather than making them change their preferred language entirely.
- cies 4y ago> If they want to continue to use JS I do not mind to never touch JS again, ever. I'm not in the business of keeping JS devs happy :)