3 ms·
I like the immutability thing and there is certain kinds of code for which it is genius but I would say you lose a factor of two or so in performance relative t
by PaulHoule 7mo ago
I like the immutability thing and there is certain kinds of code for which it is genius but I would say you lose a factor of two or so in performance relative to mutable data structures. You might say that it is a small price to pay but people who care about performance feel differently.
I think also Python just has the whole ecosystem for ML work, like so often I can just
uv install whatever
and I am working with very powerful models on my GPU: part of that is that Python has a C FFI which is easy to work with to integrate the latest numerical and ML libraries and the other path it is all stacked up in easy-to-use packages -- a non-professional programmer can use scikit-learn and pandas and matplotlib to put their skills on wheels.
Python is also a better language for metaprogramming and advanced programming. Like if you look at Graham's On Lisp my two takeaways are: (1) if we was using Clojure instead of CL he would not be fighting with nconc, and (2) almost all the examples in the book can be worked in Python without macros except for the thing where they build an async system for CL and... Python has an async system built in.
Similarly you can implement the stuff in Norvig's book Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp in Python pretty easily. Performance for branchy "old AI" tasks like rules engines and the semantic web is inferior in Python compared to the JVM but actually it is not so bad if you use PyPy.