Re:Why Python keeps growing, explained
by ironman1478 on Friday March 03, 2023 @01:00PM
(#35012970)
A lot of these problem spaces can get away with single threaded performance because maybe they're generating a report or running an analysis once a day or at even slower frequency. I work in a field where numerical correctness and readability is important for prototyping control algorithms (I work on advanced sensors) and python satisfies for those properties for our analysis and prototyping work.
When we really want or need performance we rewrite the slow part in C++ and use pybind to call into it. For all the real implementations that run in a soft real time system, everything is done in C++ or C depending on the ecosystem.
debugging dynamic python and imperative stateful python after a certain code base size >10k LOC gets extremely painful
for any meaningful scale you are better served by basic FP hygiene as evidenced in
haskell
elixir
CL/racket
I agree. But most people just need a pick up truck, not forming railway consists.
I don’t get it. Go is as imperative as a language can be.
go is imperative but there are functional elegant styles borrowed from otp/erlang in ergo https://github.com/ergo-services/ergo
https://memo.barrucadu.co.uk/three-months-of-go.html
Re:Why Python keeps growing, explained
by ironman1478 on Friday March 03, 2023 @04:34PM
(#35015353)
Because you say it doesn't make it true. It's not that painful or painful at all really. Good abstractions and planning make writing and maintaining a python easy, just like in any language.
Common Lisp, paragon of FP:
(loop for x across numbers
when (evenp x)
do (setf result (+ result x)))
I mean yeah, you can do FP in CL, but it allows you to program in any paradigm which you prefer.
fp languages like
ocaml
haskell
racket
common lisp
erlang
elixir
but even if the code is single threaded and not hampered by GIL limitations python tends to be super slow imho; also debugging dynamic python and imperative stateful python after a certain code base size >10k LOC gets extremely painful