5 ms·
Okay, I certainly don't want to start a language war, so let me be kind. There is one legitimate reason to switch from Lisp to Python: The number of packages an
by jonathanstrange 8y ago
Okay, I certainly don't want to start a language war, so let me be kind. There is one legitimate reason to switch from Lisp to Python: The number of packages and extensions. Python really has more than just batteries included, it's probably the language with the most available libraries after C++.
Still, switching from Lisp to Python is bound to be painful...
- judofyr 8y agoIf you don't want to start a language war, maybe you shouldn't present subjective opinion as facts?
- posterboy 8y agoAs with programming languages, natural languages aren't uniform. So you might interpret "one reason" to mean only one or, since "only" wasn't said, give some leeway, assume good faith, and take it as "at least one, and that maybe enough", "primary", or whatever. It's underspecified, as the linguists say.
- judofyr 8y agoThe statement could have been made more neutral by stating that it was a preference: > I prefer programming in Lisp, but the packages available for Python makes me a lot more productive. That alone is enough for me to choose Python. I still miss Lisp though. Language wars are started because people talk about their preferences as an absolute truth (and other people disagree with the presented absolute truth), and you don’t avoid them by starting with “I don’t want to start a language war” while continuing talking in the same way. If you look at the other replies you see what typically happens: someone mentioned that Lisp does also have libraries, someone mentioned that there are other reasons to choose Python, someone mentioned that the article has a different focus (teaching, not writing). Instead of a comment thread where people talk about their experiences we have a thread where people point back at the OP and loudly complain “no, but see, you are wrong, because of x”. We even have a case where the OP is getting annoyed because someone assumed he didn’t know about Norvig. Seriously, this is exactly what happens when you write in such a style. This comment alone will make someone annoyed because there are plenty of people who have used both Lisp and Python and (guess what?) prefers Python: > Still, switching from Lisp to Python is bound to be painful...
- deleted 8y ago[deleted]
- xapata 8y agoWhat if you're the author of a famous textbook and you find that your pseudocode reads more like Python than Lisp and that students on average prefer Python? Is that a legitimate reason? If not, you should probably send a nasty email to Norvig explaining his illegitimacy.
- O_H_E 8y agoJust for your info. Norvig wrote the "Paradigms of AI Programming: Case Studies in Common Lisp" book, so I would say that he is pretty knowledgeable about his stuff.
- jonathanstrange 8y agoJesus Christ, could there be more condescending commentaries than yours or that of some other replies? You can safely assume that I know who Peter Norvig is, so keep it civil. His post illustrates how many programming tasks have gone from problem solving to lego-brick programming, where library is piled upon library and each of them is incomplete and contains piles of bugs. What could possibly be wrong with that approach? Just like Norvig, I don't claim that Python is bad per se or anything like that. All I've said is that it's painful to go from CL to Python in terms of the general features of the languages (not their tooling). If you have never done this transition, have never programmed sufficiently large programs in CL and Python, please don't comment on it.
- nothrabannosir 8y agoPlease don’t swear. Please. There are no victories down this spiral. Only barren soil.
- jonathanstrange 8y agoI'm sorry, I honestly didn't realize that this counts as an instance of swearing in certain language communities. My apologies!
- deleted 8y ago[deleted]
- coldtea 8y ago>His post illustrates how many programming tasks have gone from problem solving to lego-brick programming, where library is piled upon library and each of them is incomplete and contains piles of bugs. What could possibly be wrong with that approach? Compared to problem solving which doesn't use "lego bricks" and re-makes the wheel?
- divs1210 8y agoI'm not so sure about that. Clojure is a lisp, and has full access to the Java ecosystem.
- flavio81 8y agoAlso ABCL lets you Common Lisp over the JVM and have full access to the Java ecosystem.
- sametmax 8y agoSome other reasons: - you use softwares that are scriptable in Python (SIG, Blender, etc) - you write a lot of glue code. That pretty much Python raison de vivre. - you do a lot of data analysis manually. Pandas is the new excel, and jupyter the new matlab. - you do a lot of sysadmin. Scripting is just easier in a dynamic language. - you do a lot of CRUD websites. You just can't beat the frameworks from this language for this kind of things. They do most of the work for you, and do security better than you do. - you want to integrate new members in your team faster. Python is easier to learn than lisp. - you are coding a GUI. With kivy you can target desktop and mobile with one code base, and some skins are pretty (https://imgur.com/a/IjM0XGW https://imgur.com/a/IjM0XGW). With QT you can do powerful things on the desktop. With wx you can do simple GUI simply. - you have a lot of different kinds of task at hand, and don't want to have too many different languages in your stack. Python is never the best language at anything, but it's a damn good language for most things, so it makes it a versatile toolbox.
- giancarlostoro 8y ago> - you want to integrate new members in your team faster. Python is easier to learn than lisp. Heh, I listed Python in my resume and got this as my first job (after working at my local college) and I learned it on the job (I had used Python before, but nothing major yet) and I gotta say, not only is it easy to pick up if you know other languages, it's fun to experiment with if you do know other languages! I have only played with Clojure and Racket the most on the other hand, I appreciate them and would love to learn more but I get more done with Python in shorter spans of time.
- pimeys 8y agoOne thing I don't understand here why somebody needs to switch to Python and forget other languages? Sometimes I too hack something fast with Python, but still write lots of Rust and Clojure. Then if I need Python, it is very easy to just write some and get things done.
- msl09 8y agoWhat I don't understand is the necessity of having the video of the naked pirates of the caribbean guy in the corner.
- HelloNurse 8y agoNo painful switching is intended; for Norvig's purposes there are Lisp programmers taking an AI course and Python programmers taking an AI course, and both groups should be able to follow examples in a language they know, without stumbling. Only their teachers need to adjust to the updated code examples in Norvig's updated book, and this summary is a very nice introduction to the main differences between two basically similar languages. When and whether students should learn Lisp, Python, neither, or both is an entirely different issue.
- pjmlp 8y agoJava followed by .NET, beats both reagarding available libraries, unless you mean only open source ones. And JavaScript with their one liner packages probably beats all. Python still misses having a proper mix of AOT/JIT compilers as standard toolchain, like Lisp does.
- AnimalMuppet 8y agoJava's library is like Barbie - it has everything. For a standard library, it is insanely complete. I was going to say that C probably had more complete non-standard libraries than Java. But, on reflection, for the price of writing a JNI wrapper, Java can use all those C libraries, so Java gets the superset - its own plus C's libraries. In that environment, it is obviously impossible for C to win.
- deleted 8y ago[deleted]
- xapata 8y agoThere are some libraries I maintain in Python which provide services not available as open-source in Java (or any other free language, as far as my Google searching can tell). They're related to an archaic file format that is surprisingly popular, though still esoteric.
- flavio81 8y agoSomebody is underrating the Common Lisp ecosystem, me thinks. There are much fewer libs than in Python, of course, but, most likely, everything you need you would find in CL, and some of those libs are very high quality. >There is one legitimate reason to switch from Lisp to Python: The number of packages and extensions. Python really has more than just batteries included Which you can "steal" by using them from Common Lisp. By using the lisp library called "burgled-batteries". But still, as pointed below, the Java ecosystem is even bigger, and you can easily leverage by running Common Lisp on the JVM (using Armed Bear Common Lisp). And then there is Clojure, a lisp-like language that is weaved together with the JVM and thus with very easy ways to interoperate with the JVM.
- anaphylactic 8y agoI know this comment is rather inane, but rarely have I seen a library name so fitting yet so humorous as "burgled-batteries".
- kennytilton 8y agoLisp can talk to C/C++. And do not forget Clojure. That interops with Java.