I've only dabbled with Rust but it sounds good from what you've said.
Interpreted languages should never really crash, unless you run out of memory or something, so the worst that can happen is you try to open a file that doesn't exist or something and then the interpreter just generates a runtime error, so therefore you could always catch that at the main() level.
I'm sure it's possible to artificially force Python to crash by doing something funky with ctypes but it's not like C which is basically made out of crashes, even div zero will crash on many machines iirc.
Exceptions in general are pretty good except that you can put them around multiple lines, which leads to terrible abuse. The exceptions themselves would be typed so they can have stack traces, messages etc attached, they can be defined as part of a hierarchy etc.
View all comments
Show parent comment
1
u/imp0ppable Mar 21 '24
I've only dabbled with Rust but it sounds good from what you've said.
Interpreted languages should never really crash, unless you run out of memory or something, so the worst that can happen is you try to open a file that doesn't exist or something and then the interpreter just generates a runtime error, so therefore you could always catch that at the
main()level.I'm sure it's possible to artificially force Python to crash by doing something funky with ctypes but it's not like C which is basically made out of crashes, even div zero will crash on many machines iirc.
Exceptions in general are pretty good except that you can put them around multiple lines, which leads to terrible abuse. The exceptions themselves would be typed so they can have stack traces, messages etc attached, they can be defined as part of a hierarchy etc.