3 ms·
> Why do dynamic languages excel when failure is not so bad? There's a usual confusion of banking in this case, but if we're talking about popular dynamic/memo
by viraptor 7y ago
> Why do dynamic languages excel when failure is not so bad?
There's a usual confusion of banking in this case, but if we're talking about popular dynamic/memory-managed languages, you can put an equivalent of:
try:
actual code
except:
log.exception
At a high level and be fairly sure things will be ok in a long run even with failures along the way.
On the other hand, most static-typed systems handle failures explicitly.
I think C is a bad example here. We've come a long way since C. We know how to do better.
Unless you want to include the ecosystem as well. C + valgrind + PVS + clang-analyser do make it easier to create correct code.
- joshuamorton 7y agoWait but you can do that pattern in any language (java or cpp, both of which are static, and one which is unmanaged).
- viraptor 7y agoYou can't really do it in c++ in the same way. If you mess up you will crash on invalid memory reference. With Java, you'll catch a bad cast or a null ref exception instead.