Re:Django 4.0 release candidate 1 released
by dangerbird2 on Monday November 22, 2021 @12:26PM
(#29309003)
It's less about static checking than it is runtime debugging. When you have a syntax error in a template, Django's error reporting is super opaque about the problem, usually just raising a TemplateSyntaxError with a vague description. This just gives you the python error stack with little information of the actual context of the actual problem in the template itself.
By contrast, if you have a problem in the python code, the exception stacktrace will point you to exactly where the problem originates. If you add a `breakpoint()` call in the source before the exception point and run the request again, you'll get dropped into a live debugging repl
Re:Django 4.0 release candidate 1 released
by scrollaway on Monday November 22, 2021 @12:14PM
(#29308820)
Python doesn't have the problem as much. It does to an extent, though it's getting better with type hinting nowadays.
I do prefer working with typescript than with python but I still rather work with Python than with django templates which are way worse.
Either you write big test cases covering everything, or you live with the knowledge that very unexpected things can be passed in to your methods without you getting notified.
And then there's javascript ...