4 ms·
It is, but there are situations where speed of execution and use of memory are less important criteria for choosing a language. For example, when developing ver
by amatic 11y ago
It is, but there are situations where speed of execution and use of memory are less important criteria for choosing a language. For example, when developing very large and complex programs. Lisp(s) allow encapsulation (hiding) of complexity into small modules, easier than c-family languages. Programs in lisp are faster to write, easier to maintain and reason about. The cost of being a bit slower is getting less important with better hardware.
- dzhiurgis 11y agoI've read something quite contrary on reddit. It was about Clojure vs Haskell and more specifically, dynamic vs static typing. Person was claiming that it was so much easier to change statically typed languages. It get more difficult to maintain large projects that are Lisps. From what I've learned so far about languages, it makes sense. It looks that Lisps are more suitable for implementing algorithms because of the reductionism, but in more realistic systems world, you build interfaces, add random strings, and so on. If you are patient and good enough, you can probably build significant part of a system, but not all of it. I do not know any systems built entirely on Lisp, but I might be wrong.
- CHY872 11y agoIt totally depends on what you're doing with your software; different tasks map better or worse to the respective paradigms, depending on what you're trying to do. Static typing certainly makes it easier to maintain large systems, but it's certainly not a requirement. You can certainly write entire systems in Lisp; people have made entire computers in order to run Lisp in hardware; there have been operating systems etc. Moreover, you don't really need to use it for whole systems; use it where it works. There need not be One True Language. At the moment, Clojure is used in production at Netflix, Twitter, Amazon, Akamai, etc etc etc.
- mbrock 11y agoSince Lisp in many variants (Common Lisp, for example) does have static type checking [1], that argument is not very strong. For some examples of systems built on Lisp: Emacs, Hacker News, Paul Graham's startup Viaweb, the original Reddit. [1]: http://www.sbcl.org/manual/#Type-Errors-at-Compile-Time http://www.sbcl.org/manual/#Type-Errors-at-Compile-Time
- reikonomusha 11y agoCommon Lisp doesn't have full static type checking, and very little polymorphic type checking. Only one Lisp compiler (and its derivative) can even do something that's remotely close to static type checking, and even then it's woefully incomplete. It's nowhere near Haskell/ML, or even C/Java.
- mbrock 11y agoYeah, it was wrong to say that Common Lisp has static type checking, as it's not part of the standard, and I'm not familiar with many implementations. All I really know is that when I've programmed with SBCL, I've gotten useful type checking warnings at compile time. I agree that static type checking is very useful for less stressful refactoring, and so on, and I'm a huge fan of Haskell. But I think very simple kinds of type checking can often be enough. The argument was that Lisp lacks types to such an extent that building large Lisp systems becomes very difficult (due to the lack of typing). Well, there are lots of large JavaScript systems these days, and Common Lisp, in my experience with SBCL, provides at least more compile-time type checking than that.
- peatmoss 11y ago> dynamic vs static typing And some lisps, such as Racket, allow you to switch from untyped to typed with nominal changes.
- bane 11y agoMany of the benefits of Lisps that you talk about here seem to be refuted by writeups I've read where large groups switched from a Lisp to something else...often because it was hard to work with, slower to write and harder to maintain. http://www.aaronsw.com/weblog/rewritingreddit http://www.aaronsw.com/weblog/rewritingreddit Over at reddit.com, we rewrote the site from Lisp to Python in the past week. It was pretty much done in one weekend. (Disclosure: We used my web.py library.) The others knew Lisp (they wrote their whole site in it) and they knew Python (they rewrote their whole site in it) and yet they decided liked Python better for this project. The Python version had less code that ran faster and was far easier to read and maintain. http://www.redditblog.com/2005/12/on-lisp.html http://www.redditblog.com/2005/12/on-lisp.html If Lisp is so great, why did we stop using it? One of the biggest issues was the lack of widely used and tested libraries. Sure, there is a CL library for basically any task, but there is rarely more than one, and often the libraries are not widely used or well documented. Since we're building a site largely by standing on the shoulders of others, this made things a little tougher. There just aren't as many shoulders on which to stand. ... We were already familiar with Python. It's fast, development in Python is fast, and the code is clear. ... The entire task took less than a week, with 80% of the code written in a single weekend. I know of several other large corporate projects over the years that made similar switches for similar reasons. Perl, Python, Java, etc. were faster to write in, performed better, and had better long-term maintainability (okay, maybe not Perl). Nobody regrets those switches except for a couple Lispers who continue to complain about how none of this is true, even after Lisp didn't provide the results, and something else did. Continuing to claim that Lisp is better than all the proven better alternatives starts to make it smell like religion. Trying to explain away why a Lisp didn't work for whatever reason, but it's still the best start to taste like religion. At some point its important to just make a call and realize that Lisps are interesting, you can compute with them, and they've had important influence, but they aren't the best way to do things - for many reasons. There's always another language choice that's faster, or easier, or offers a better ecosystem. GNU CL has been out for a long while now, and it hasn't taken the world by storm. "Better", while qualitative in many respects, is also obvious, and it's obvious across a sample of millions of software projects that there are simply better holistic software development tools. edit it makes me really happy when this gets downvoted without comment. Nobody ever downvotes an anti-Lisp rant with a pointer to a large and ongoing Lisp-based project. They just virtually claim I'm wrong without any substantial backup.