Live data from Hacker News

A difference between Haskell and Common Lisp

chrisdone.com

101–110 of 203 posts

Re: A difference between Haskell and Common Lisp

#101
post #30

Actually Common Lisp supports a gazillion of different programming styles. The version with small functions, similar to the Haskell version: (subseq (remove-if (complement #'numberp) (butlast list 3)) 0 5) In above Common Lisp code, we use four different functions which do one task: * subseq sequence start &optional end => subsequence * remove-if test sequence => result-sequence * complement function => complement-fu…

"Check out the UNIX man for tail, grep, ... to see how strange above quote about 'unix philosophy' is."

I think a lot of that is due to the untyped nature of unix. Everything is text, so you constantly have to specify details about what the actual input is.

Not sure if that applies to lisp or not.

Granted, that's not the only reason.

Re: A difference between Haskell and Common Lisp

#102
post #73

Title is misleading; this is about Common Lisp in particular.

Well, Common Lisp is Lisp. Scheme, Clojure etc. are lisps, with lower-case "l" ;)

That's just wrong.

Clisp is the most popular lisp bearing the name, but the LISP, Lisp, or lisp family includes Scheme, and Clojure. if you just refer to Lisp, you may be referring to Clisp, the lisp family, or maybe even LISP 1.5, the lisp equivalent of V7 unix.

Re: A difference between Haskell and Common Lisp

#103

The biggest difference between Haskell and Lisp is that Lisp is multi-paradigm, while Haskell is not. Haskell is more opinionated, and makes a bunch of decisions for you (that you can choose to work around/sugar/hack until Haskell looks like something else/does what you want). All the other things that Haskell comes with - strong typing, monads, lazy evaulation, can be written into common lisp, but whether you need t…

They can't be written in Lisp well, or at all. Strong typing with inference can't be bolted on. Monads that take advantage of this typing can't be bolted on. Changing Lisp to have lazy semantics across the board ain't gonna happen. You might be able to write a Haskell interpreter from scratch that interacts with the Lisp environment, but you can't feasibly transform Lisp itself.

No, but you can build a new lisp :-D. Or just use Shen.

Re: A difference between Haskell and Common Lisp

#104
post #35

Perhaps it's just me, but I don't see that Haskell and Lisp are that similar, other than... 1. They're both programming languages. 2. They both allow you to pass functions as arguments to other functions. Am I missing something here? Why are the two linked? Is it because Lisp is seen as the birthplace of functional languages (because of point 2)?

Yeah, people talk about "functional languages" as if they're a unified thing. IMO the differences between the strongly typed ML/Haskell tradition and the Lisp tradition are as big as the differences between either and "OO languages" or "imperative languages", but that's not the way it's usually presented.

That's nonsense. Lisp in the functional style vs. Haskell is two different implementations of what are at their essence the same ideas. However, lisp is multi-paradigm, which complicates the comparison somewhat...

Re: A difference between Haskell and Common Lisp

#105
post #32

Having worked on one of the largest common lisp projects I have to say this is spot on. And monolithism it's not just visible on level of functions it's visible on higher level. Common lisp nudges you to write monolithic applications and it's crucial to keep many details in one head (in case of big project - many heads). Also I think Clojure is scheme, so overall approach is different.

Scheme is a lisp.

Also, yeah, Common lisp probably would push for monolithism. Lisp Machine Lisp, upon which Common Lisp was based, was very much built upon The Right Thing, monolithic tradition of MIT, ITS, and all of the lisp machines.

Re: A difference between Haskell and Common Lisp

#106

Earlier quoted context omitted.

It's easier for people propping up one language over another language family to ignore the similarly easy ways to do things in prominent members of that language family. ;)

Well, yes. Lisp and CL are not the same. If anything, this has made me rethink possibly going over to common lisp, which I was thinking of for the larger stdlib, because SBCL is very fast, supports TCO, and you can disable case insensitivity.

Common LISP was made to smooth over the differences of the ancient LISP's plus standardize their situation a bit. If those don't matter to you, then the alternatives are often better. SBCL being one of them. If I get back into LISP, I think the Racket Scheme community looks like it's delivering most bang for buck in terms of what the tools can do after investing time learning them.

Re: A difference between Haskell and Common Lisp

#107
post #41

Earlier quoted context omitted.

Could you elaborate? What about shen makes you say this?

Shen is like C++ in that it's bolted on top of a less typeful language (except this time it's Common Lisp, rather than C), and is "type safe" as long as you don't deliberately use a number of escape hatches.

That's wrong in just about every respect.

Shen is a PLATFORM INDEPENDANT (not clisp based) language with an emphasis upon functionalism, a novel and very powerful type system based on sequent calculus, and OPTIONAL type checking, IF you want it. It is platform independant because it is built upon an incredibly simple lisp that you can build an interpreter for on top of almost any platform, so long as you can guarantee TCO.

It really is lisp flavored haskell.

Re: A difference between Haskell and Common Lisp

#108

Perhaps it's just me, but I don't see that Haskell and Lisp are that similar, other than... 1. They're both programming languages. 2. They both allow you to pass functions as arguments to other functions. Am I missing something here? Why are the two linked? Is it because Lisp is seen as the birthplace of functional languages (because of point 2)?

Both language communities are enamored of manipulating and interpreting various flavors of rose tree.

Re: A difference between Haskell and Common Lisp

#110
post #48

Earlier quoted context omitted.

> Check out the UNIX man for tail, grep, ... to see how strange above quote about 'unix philosophy' is. I wish someone would take that hoary old meme out behind the barn and put it out of our collective misery.

unix commands may not be the pinnacle of minimalism, but the most important thing UNIX taught is about composability. Yes, I did recognize the irony of the fact that the common lisp example was much more like a unix command line than the haskell example, but if you're talking about composing (relatively) small commands, unix is still a pretty good comparison.

I guess that's why Unix-like OSs are so user-friendly. Just like snapping together lego blocks... not really though.

It says something about the state of software if Unix is the thing that "taught us about composability". Laughable.

Post reply on HN