Re:Why I love Common Lisp and hate Java (2012)
by j88439h84 on Sunday November 04, 2018 @08:44PM
(#18379200)
What are those benefits?
Re:Why I love Common Lisp and hate Java (2012)
by lou1306 on Tuesday November 06, 2018 @06:20AM
(#18390011)
Of course it's just better organization of the codebase and a less-polluted namespace.
Also, if you're writing a library, it may affect the API you give to the user. If you move a function to a static method, the end user only needs to import the desired class.
But again, they are "usability" benefits. I'm no CPython expert but I don't think that a static method would have noticeably worse (or better) performance than a function.
In principle, it makes sense to "bundle" functions that are strictly related to a class within the class itself (i.e. as static methods). Of course, the benefits viz. top-level functions are only noticeable if your codebase is big enough.