Re:Do you think writing backend with Python feels wrong?
by damacaner on Thursday June 15, 2023 @04:17PM
(#36345899)
Yes that is right too.
Dynamic typed languages always feels like I am 6 again, with my crayons all over the place, doing random bullshit go till something sensible comes out.
Good luck finding what is wrong if a bug occurs, good luck if you will refactor it and think how can you replace it, how can you rewrite it without destroying the whole aesthetic of the code. just like my parents trying to figure out how will they renew the wall after I draw a huge chunk of random shit to the wall with my crayons.
Re:Do you think writing backend with Python feels wrong?
by gazpacho on Thursday June 15, 2023 @04:17PM
(#36345901)
If he’s using FastAPI he is essentially forced to use typing and is probably running a static type checker
Re:Do you think writing backend with Python feels wrong?
by damacaner on Thursday June 15, 2023 @04:19PM
(#36345927)
Even, it's only enforced in routing functions.
Outside of it, like utility packages, MongoDB or such so, you are not enforced, go with whatever you want.
...guess what my coworkers prefer! urgh.
Re:Do you think writing backend with Python feels wrong?
by roflyear on Thursday June 15, 2023 @10:58PM
(#36350546)
True, absolutely, but if you add type hints before you refactor, it isn't too bad.
Re:Do you think writing backend with Python feels wrong?
by throwaway019254 on Friday June 16, 2023 @04:21AM
(#36353195)
Not before the refactor. Type hints need to be there from beginning. I can't imagine anybody decides writing python without type hints in 2023.
The dynamic typing eventually makes certain kinds of bugs creep into your code and it can be difficult to realise.
Code written in dynamic languages are also more difficult and time consuming to refactor than code written in a statically typed language.