* Haskell vs OCaml @ 2008-08-13 12:48 circ ular 2008-08-13 13:27 ` [Caml-list] " Brian Hurt ` (3 more replies) 0 siblings, 4 replies; 39+ messages in thread From: circ ular @ 2008-08-13 12:48 UTC (permalink / raw) To: caml-list What are the advantages/disadvantages when comparing OCaml to Haskell? ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-13 12:48 Haskell vs OCaml circ ular @ 2008-08-13 13:27 ` Brian Hurt 2008-08-14 0:09 ` Jon Harrop ` (2 subsequent siblings) 3 siblings, 0 replies; 39+ messages in thread From: Brian Hurt @ 2008-08-13 13:27 UTC (permalink / raw) To: circ ular; +Cc: caml-list circ ular wrote: >What are the advantages/disadvantages when comparing OCaml to Haskell? > > > The biggest disadvantage of comparing Ocaml to Haskell would have to be causing a long, pointless flamewar. Offhand, I can't think of an upside. Brian ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-13 12:48 Haskell vs OCaml circ ular 2008-08-13 13:27 ` [Caml-list] " Brian Hurt @ 2008-08-14 0:09 ` Jon Harrop 2008-08-14 2:46 ` David Thomas 2008-08-14 11:50 ` blue storm 2008-08-20 11:33 ` Dr. Thomas Fischbacher 3 siblings, 1 reply; 39+ messages in thread From: Jon Harrop @ 2008-08-14 0:09 UTC (permalink / raw) To: caml-list On Wednesday 13 August 2008 13:48:45 circ ular wrote: > What are the advantages/disadvantages when comparing OCaml to Haskell? Techically, predictable performance, high performance on x64, tools like camlp4 and language features including records, functors, polymorphic variants and structurally-typed objects are probably the main advantages of OCaml over Haskell. Non-technically, OCaml has more well-tested libraries, more practical books (e.g. my own), more high-profile open source projects (e.g. FFTW has millions of users): http://ocamlnews.blogspot.com/2007/12/top-10-most-popular-ocaml-programs.html http://haskell-news.blogspot.com/2008/01/top-10-most-popular-haskell-programs.html and is much more widely used in industry. There are far more practically-minded people in the OCaml community and that is reflected in the much larger number of commercial products that use OCaml. Tangentially, OCaml has a successful relative in F# whereas Haskell's close relatives are extinct. I did extensive research on all of the most popular functional languages last year, including Haskell. In case you are trying to do something similar, I'll warn you that almost all of the examples of Haskell's use in industry are fakes, e.g. companies that have no products, companies that have one product that never used Haskell, companies that happen to have two Haskell advocates working for them out of 150 developers, companies where one employee once did a preliminary Haskell program but nothing since and, finally, plain old spam where companies that have never had anything to do with Haskell have hijacked the Haskell site to advertise on-line only to be hailed as a "real world" example of Haskell in industry by its proponents. I was rather baffled when I discovered this and have never seen behaviour like it. Haskell also has some advantages over OCaml, of course, but you should probably ask the Haskell community to explain them. I consider them all to be untested because nobody has ever done anything significant using Haskell AFAIK. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-14 0:09 ` Jon Harrop @ 2008-08-14 2:46 ` David Thomas 2008-08-14 2:52 ` Erik de Castro Lopo 2008-08-14 12:17 ` Jon Harrop 0 siblings, 2 replies; 39+ messages in thread From: David Thomas @ 2008-08-14 2:46 UTC (permalink / raw) To: caml-list --- On Wed, 8/13/08, Jon Harrop <jon@ffconsultancy.com> wrote: > I consider them all to be untested because nobody has ever done anything > significant using Haskell AFAIK. Besides the window manager I'm currently using... :-P ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-14 2:46 ` David Thomas @ 2008-08-14 2:52 ` Erik de Castro Lopo 2008-08-14 10:37 ` Paolo Donadeo 2008-08-14 12:17 ` Jon Harrop 1 sibling, 1 reply; 39+ messages in thread From: Erik de Castro Lopo @ 2008-08-14 2:52 UTC (permalink / raw) To: caml-list David Thomas wrote: > --- On Wed, 8/13/08, Jon Harrop <jon@ffconsultancy.com> wrote: > > I consider them all to be untested because nobody has ever done anything > > significant using Haskell AFAIK. > > > Besides the window manager I'm currently using... :-P And Darcs the distributed revision control system. Erik -- ----------------------------------------------------------------- Erik de Castro Lopo ----------------------------------------------------------------- "Do I do everything in C++ and teach a course in advanced swearing?" -- David Beazley at IPC8, on choosing a language for teaching ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-14 2:52 ` Erik de Castro Lopo @ 2008-08-14 10:37 ` Paolo Donadeo 0 siblings, 0 replies; 39+ messages in thread From: Paolo Donadeo @ 2008-08-14 10:37 UTC (permalink / raw) To: caml-list > And Darcs the distributed revision control system. Erik, Darcs is so slow, buggy and broken by design (I speak for direct experience) that even the GHC team decided to switch to GIT or Mercurial, see [1] and [2]. Consider this: three years ago I decided to study a functional language and I had to decide between OCaml and Haskell. In that period, for other reasons, I was searching for a new SCM to replace CVS and I extensively tested Darcs. Darcs was so broken that I decided for OCaml when I realized it was written in Haskell. So Darcs, IMHO, is definitively not "anything significant". [1] http://www.reddit.com/comments/6v2nl/ghc_project_switches_to_git/ [2] https://lopsa.org/node/1656 -- Ing. Paolo Donadeo Studio Associato 4Sigma Website: http://www.4sigma.it Email: p.donadeo@4sigma.it ~ ~ :wq ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-14 2:46 ` David Thomas 2008-08-14 2:52 ` Erik de Castro Lopo @ 2008-08-14 12:17 ` Jon Harrop 2008-08-14 16:44 ` Erik de Castro Lopo 1 sibling, 1 reply; 39+ messages in thread From: Jon Harrop @ 2008-08-14 12:17 UTC (permalink / raw) To: david_hd, caml-list On Thursday 14 August 2008 03:46:10 David Thomas wrote: > --- On Wed, 8/13/08, Jon Harrop <jon@ffconsultancy.com> wrote: > > I consider them all to be untested because nobody has ever done anything > > significant using Haskell AFAIK. > > Besides the window manager I'm currently using... :-P Interestingly, the number of registered installs of XMonad has increased a lot from only 95 in January to 542 now. However, that is still orders of magnitude fewer than the most popular open source software written in OCaml: Debian and Ubuntu registered installs ------------------------------------- 184,574: FFTW (14,298 lines of OCaml) 12,866: Unison (23,993 lines of OCaml) 7,286: MLDonkey (171,332 lines of OCaml) 4,365: Darcs (3,939 lines of Haskell) 4,066: FreeTennis (7,419 lines of OCaml) 4,057: Planets (3,296 lines of OCaml) 3,465: HPodder (2,225 lines of Haskell) 2,965: LEdit (2,048 lines of OCaml) 2,822: Hevea (11,596 lines of OCaml) 2,657: Polygen (1,331 lines of OCaml) So: . 8/10 of the top ten most popular OCaml/Haskell open source projects on Debian and Ubuntu were written in OCaml and not Haskell. . 221,293 installs of popular OCaml software compared to only 7,830 of Haskell. . 235,312 lines of well-tested OCaml code compared to only 6,164 lines of well-tested Haskell code. Some of the Haskell projects (e.g. pugs and srcinst) have even *decreased* in popularity over the past 7 months. Indeed, Darcs was only being used to a significant extent by the Haskell community and the GHC developers are now giving up on it themselves citing awful performance as one of the main reasons: http://hackage.haskell.org/trac/ghc/wiki/DarcsEvaluation Note their own benchmark results: Annotate: Darcs is 50x slower than Git. Clone: Darcs is 49x slower than Git. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-14 12:17 ` Jon Harrop @ 2008-08-14 16:44 ` Erik de Castro Lopo 0 siblings, 0 replies; 39+ messages in thread From: Erik de Castro Lopo @ 2008-08-14 16:44 UTC (permalink / raw) To: caml-list Jon Harrop wrote: > 184,574: FFTW (14,298 lines of OCaml) For FFTW, Ocaml is used the generate C code. Nothing that the final user of libfftw links to is written in Ocaml. I don't think this one really counts. > Some of the Haskell projects (e.g. pugs and srcinst) have even *decreased* > in popularity over the past 7 months. Indeed, Darcs was only being used to a > significant extent by the Haskell community and the GHC developers are now > giving up on it themselves citing awful performance as one of the main > reasons: > > http://hackage.haskell.org/trac/ghc/wiki/DarcsEvaluation Darcs with its theory of patches is also far more experimental and is pushing back the boundaries of how people who write revision control software think about the field. Erik -- ----------------------------------------------------------------- Erik de Castro Lopo ----------------------------------------------------------------- "Incompetence, like misery, seeks company." -- Erik Naggum ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-13 12:48 Haskell vs OCaml circ ular 2008-08-13 13:27 ` [Caml-list] " Brian Hurt 2008-08-14 0:09 ` Jon Harrop @ 2008-08-14 11:50 ` blue storm 2008-08-14 12:47 ` David Mitchell ` (2 more replies) 2008-08-20 11:33 ` Dr. Thomas Fischbacher 3 siblings, 3 replies; 39+ messages in thread From: blue storm @ 2008-08-14 11:50 UTC (permalink / raw) To: circ ular; +Cc: caml-list [-- Attachment #1: Type: text/plain, Size: 3295 bytes --] So it seems the debate went on anyway. I had written something, but when just before posting i saw Brian Hurt's post, and decided not to. It now seems i was wrong, and actually (when reading the others) my post seems quite balanced after all. I'm not saying that the other posters are biased in any way. But i have the point of view of someone trying to learn a language "for fun" and in order to discover interesting features or novel point of views. It seems Haskell do much better in that context that in the "use it to do something useful in the cruel world" context used so far. So here is my original post : I'm afraid your question is a bit too general (and it seems strange to ask that on the mailing-list of one of the projects, while asking for a balanced answer). The main differences are : OCaml is impure (imperative features in the language), Haskell is pure. OCaml is strict, Haskell is lazy. Ocaml has modules, Haskell has type classes. If you're coming from the imperative land, OCaml is, in my opinion, easier to learn. It is also a good choice to begin with OCaml because everything you learn with the OCaml basics can be reused for learning Haskell (the converse is also true, but then you have to learn lazy evaluation first, wich is a non-trivial shift, and is vastly less used in OCaml). Haskell is certainly worth the effort, but my personal opinion is that learning OCaml first is a good idea. Moreover, for "real world" application, you may prefer OCaml over Haskell. The syntax are different, but not so much (before learning haskell, i could generally understand the purpose of tiny haskell sources). I have heard some people say they prefer the Haskell syntax, but this is more a matter of taste (and not very relevant if you want to learn something from the language semantics). Both have their ugly sides. Idiomatic OCaml implementations tend to produce more efficient than Idiomatic Haskell implementations (but Haskell compilers are getting better and better everyday (for Haskell performances to be good, compilers have to do lots of clever and not so simple optimizations), and Haskell is faster than most (scripting) languages used these days anyway). The Haskell standard library is bigger than the Ocaml one, but this is probably not an advantage for beginners (because this means more time spent in browsing the doc, while playing with the language and reimplementing functions yourself is much more interesting). Haskell program thus tends to be more terse and "higher-level" (because of reusing a lot of higher-order combinators in the stdlib): OCaml is also very expressive, but the simplicity of the stdlib tends to keep people on simpler things. To the advanced programmer, both languages have interesting advanced features to offer. Haskell tends to specialize in sophisticated type system features, whereas OCaml has an interesting object system, and polymorphic variants. Both languages have very interesting derivatives, specific languages intended to explore a specific area (concurrency, metaprogramming, etc...). Camlp4 is a flexible and powerful Ocaml preprocessor. Haskell has some tools in that direction, that i have never used (so i'm mostly guessing here), but they seem to be even less supported and used inside the community. [-- Attachment #2: Type: text/html, Size: 3466 bytes --] ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-14 11:50 ` blue storm @ 2008-08-14 12:47 ` David Mitchell 2008-08-14 13:28 ` Peng Zang 2008-08-14 13:57 ` Jon Harrop 2 siblings, 0 replies; 39+ messages in thread From: David Mitchell @ 2008-08-14 12:47 UTC (permalink / raw) To: blue storm; +Cc: circ ular, caml-list Thanks - nice summary Dave M. On 14/08/2008, blue storm <bluestorm.dylc@gmail.com> wrote: > So it seems the debate went on anyway. I had written something, but when > just before posting i saw Brian Hurt's post, and decided not to. It now > seems i was wrong, and actually (when reading the others) my post seems > quite balanced after all. > > I'm not saying that the other posters are biased in any way. But i have the > point of view of someone trying to learn a language "for fun" and in order > to discover interesting features or novel point of views. It seems Haskell > do much better in that context that in the "use it to do something useful in > the cruel world" context used so far. > > So here is my original post : > > I'm afraid your question is a bit too general (and it seems strange to ask > that on the mailing-list of one of the projects, while asking for a balanced > answer). > > The main differences are : > OCaml is impure (imperative features in the language), Haskell is pure. > OCaml is strict, Haskell is lazy. > Ocaml has modules, Haskell has type classes. > > If you're coming from the imperative land, OCaml is, in my opinion, easier > to learn. > It is also a good choice to begin with OCaml because everything you learn > with the OCaml basics can be reused for learning Haskell (the converse is > also true, but then you have to learn lazy evaluation first, wich is a > non-trivial shift, and is vastly less used in OCaml). > Haskell is certainly worth the effort, but my personal opinion is that > learning OCaml first is a good idea. Moreover, for "real world" application, > you may prefer OCaml over Haskell. > > The syntax are different, but not so much (before learning haskell, i could > generally understand the purpose of tiny haskell sources). I have heard some > people say they prefer the Haskell syntax, but this is more a matter of > taste (and not very relevant if you want to learn something from the > language semantics). Both have their ugly sides. > > Idiomatic OCaml implementations tend to produce more efficient than > Idiomatic Haskell implementations (but Haskell compilers are getting better > and better everyday (for Haskell performances to be good, compilers have to > do lots of clever and not so simple optimizations), and Haskell is faster > than most (scripting) languages used these days anyway). > > The Haskell standard library is bigger than the Ocaml one, but this is > probably not an advantage for beginners (because this means more time spent > in browsing the doc, while playing with the language and reimplementing > functions yourself is much more interesting). Haskell program thus tends to > be more terse and "higher-level" (because of reusing a lot of higher-order > combinators in the stdlib): OCaml is also very expressive, but the > simplicity of the stdlib tends to keep people on simpler things. > > To the advanced programmer, both languages have interesting advanced > features to offer. Haskell tends to specialize in sophisticated type system > features, whereas OCaml has an interesting object system, and polymorphic > variants. Both languages have very interesting derivatives, specific > languages intended to explore a specific area (concurrency, metaprogramming, > etc...). > > Camlp4 is a flexible and powerful Ocaml preprocessor. Haskell has some tools > in that direction, that i have never used (so i'm mostly guessing here), but > they seem to be even less supported and used inside the community. > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: > http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > > ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-14 11:50 ` blue storm 2008-08-14 12:47 ` David Mitchell @ 2008-08-14 13:28 ` Peng Zang 2008-08-14 14:01 ` Peng Zang 2008-08-14 13:57 ` Jon Harrop 2 siblings, 1 reply; 39+ messages in thread From: Peng Zang @ 2008-08-14 13:28 UTC (permalink / raw) To: caml-list; +Cc: blue storm, circ ular -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 14 August 2008 07:50:43 am blue storm wrote: > The main differences are : > OCaml is impure (imperative features in the language), Haskell is pure. > OCaml is strict, Haskell is lazy. > Ocaml has modules, Haskell has type classes. I would restate the last as: OCaml has an object system, Haskell has type classes. In Haskell you can write a function that takes anything that is "showable" (a type class) and print it out. The sig would be something like (I'm mixing OCaml and Haskell syntax here, but hopefully the point is still clear): Showable 'a => 'a -> unit You can't quite do that with modules/functors. However with objects you can write a function that takes a showable and executes it. It's sig would look like this: showable -> unit where class type showable = object method print : unit -> unit ... end As to Haskell vs. OCaml, they are both great languages. Haskell is more researchy and experimental (although with Haskell Prime they are making a big push to make it more friendly to industrial uses). This is great because you get some really cool stuff. This is also bad because all the cool stuff is hard to understand and sometimes you-just-want-to-get-stuff-done. OCaml is great for that and for one other thing that I think few people point out. OCaml supports a variety of programming styles: OO, imperative and functional. This means it's easy for anyone to pick up and use. If you have collaborators, OCaml projects have an easier learning curve. Anyone can feel more or less at home using OCaml in a week. In contrast, Haskell has quite a steep initial learning curve (eg. you need to learn monads before you can write any interesting real-world application) which can be a big barrier to potential collaborators. Also the ability to switch styles often lets you write faster. For some problems, I just think in one style versus another. It just comes more easily to me in a functional style sometimes, and an OO style other times. OCaml let's you write however you think about it. Haskell makes you think about it in *the haskell* way. Sometimes this is good because it forces you to do certain things. Othertimes it just gets in your way. Peng -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) iD8DBQFIpDMIfIRcEFL/JewRAtN1AKCth4Iep/uNUaFObIcyvAQXS0LmwgCdHQB2 wP8iIzC8YUtOlxmuPPfSKqU= =g/dJ -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-14 13:28 ` Peng Zang @ 2008-08-14 14:01 ` Peng Zang 2008-08-15 2:09 ` blue storm 0 siblings, 1 reply; 39+ messages in thread From: Peng Zang @ 2008-08-14 14:01 UTC (permalink / raw) To: caml-list; +Cc: blue storm, circ ular -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 14 August 2008 09:28:34 am Peng Zang wrote: > OCaml let's you write however you think about it. Haskell makes you think > about it in *the haskell* way. Sometimes this is good because it forces > you to do certain things. Othertimes it just gets in your way. > > > Peng Haha, I have some free time. So, let me explain more about why sometimes it's good that Haskell makes you do things in a certain way. One is that Haskell forces your program into two parts. Parts that contain side-effects (in monads) and the part that is pure. This is great because the compiler can now do some optimizations not available when you don't know if your code is pure. This is also good because side-effects can be confusing and difficult to maintain over time. By putting all the side effects in a box, you can compartmentalize it away. For lots of changes you only have to consider the pure stuff which is easier to think about (no worries about state, no worries about the right order of doing things, program in a declarative fashion). The downside is you have to put all the side-effect stuff in a corner and box it off. This can be a little odd because it may make you organize your code in a counterintuitive way. Also it makes side-effect creep very obvious (when you realize "oops, that needs to be in a monad too... and that... and that ... crap"). You really have to sit down and think about the design before you do anything. Haskell is definitely a first-on-paper, then-in-code type of language. This can be good because for complex stuff you probably want to think about the design ahead of time anyways. Haskell forces this discpline on you. On the other hand, if you like to do rapid prototyping type of approach and live on the edge a bit, it can be a bummer. A similar argument follows for lazy (non-strict) evaluation as well. Allows some really cool stuff (eg. infinite lists) and optimizations (eg. deforestation). But has significant overhead (eg. you have to make a thunk for everything, if you're going to evaluate it anyways, all that work to make the thunk is wasted) and it's hard to reason about speed and memory performance (eg. it looks like a tail recursive function that uses constant stack space but because the accumulator is thunked, you end up creating O(N) thunks). Anyways, I think Haskell has some really cool ideas and I like it. It definitely expands the mind. But OCaml is my go-to-swiss-army-knife of languages. It used to be C but that was too low level for me and library support was crap (this was before Boost). Then it was Java but it was waay to verbose and you couldn't even return a tuple without creating a class for it first. Then it was Lisp, but it's dynamically typed and I got tired of finding bugs from 3 years ago. Now days it's OCaml. Maybe one day it'll be something else, but in the mean time, I'm enjoying it. Peng -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) iD8DBQFIpDq+fIRcEFL/JewRAv3eAJ9L3W43Qfn2bFpLpUiyRt4Dn1dt6gCeNvew 8w6kCN5AKcGJH8WYzJPyKVM= =6HsO -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-14 14:01 ` Peng Zang @ 2008-08-15 2:09 ` blue storm 0 siblings, 0 replies; 39+ messages in thread From: blue storm @ 2008-08-15 2:09 UTC (permalink / raw) To: peng.zang; +Cc: caml-list, circ ular > One is that Haskell forces your program into two parts. Parts that contain > side-effects (in monads) and the part that is pure. You can actually do quite a bit more, using different monads to compartementalize different aspects of your code. You will, by the way, have noticed that Haskellers tend to put everything in the IO monad (when a separate monad would make more sense) because mixing monads is difficult. > This is great because > the compiler can now do some optimizations not available when you don't know > if your code is pure. I suppose you could get the same benefits with a "purity inference" compiler pass, the same way haskell compilers a "strictness inference". > it makes side-effect creep very obvious (when you realize "oops, that needs > to be in a monad too... and that... and that ... crap"). unsafePerformIO to the rescue ! I generally agree with the interest of pure programming in some part of the language. It is, however, not all as rosy as you say (i've seen people argue that the "side-effect creep" related to monads cause composability problems) because they are hard issue (monads mixing for example) wich have not been quite resolved yet. Haskell is interesting because of that experimental taste, but i totally agree it "sometimes gets in your way". > A similar argument follows for lazy (non-strict) evaluation as well. Allows > some really cool stuff (eg. infinite lists) and optimizations (eg. > deforestation). Explicit lazy evaluation (as in OCaml) can give you the same cool stuff, with a saner standard (strict evaluation) and, in my opinion, increased comprehensibility (by explicitely highlighting the part that rely on lazy evaluation). Both library and syntaxic support of lazy values in OCaml could be better that they are now, but they is work going on (we even have *several* lazy lists librairies these day). > That's true, but I think Haskell's point of view is to stop that completely. > They want to remove optimization of code and put it into the hands of the > compiler. The ideal is to say to the programmer: "don't worry about > performance and optimization, just write correct code. The compiler will > figure out the rest". I strongly disagree on that point. You just can't rely on anything that optimizes "as much as possible" when you don't know precisely what it does. The idea to "not worry about performance" is, in my opinion, wrong because you'll always have specific cases wich are not correctly optimized (see for example the posts on the performance of high-level automatic differentiation stuff that went on the Haskell planet a month ago or so). The usual programmer should not need to know about subtle and implementation-specific stuff (whereas the requirement of understanding tail-recursion is commonly accepted among OCaml programmers), but trying to optimize every naive code into something efficient is a dangerous dream. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-14 11:50 ` blue storm 2008-08-14 12:47 ` David Mitchell 2008-08-14 13:28 ` Peng Zang @ 2008-08-14 13:57 ` Jon Harrop 2008-08-14 14:06 ` Peng Zang ` (2 more replies) 2 siblings, 3 replies; 39+ messages in thread From: Jon Harrop @ 2008-08-14 13:57 UTC (permalink / raw) To: caml-list On Thursday 14 August 2008 12:50:43 blue storm wrote: > It is also a good choice to begin with OCaml because everything you learn > with the OCaml basics can be reused for learning Haskell (the converse is > also true, but then you have to learn lazy evaluation first, wich is a > non-trivial shift, and is vastly less used in OCaml). Monads and zippers? > The syntax are different, but not so much (before learning haskell, i could > generally understand the purpose of tiny haskell sources). I have heard > some people say they prefer the Haskell syntax, but this is more a matter > of taste (and not very relevant if you want to learn something from the > language semantics). Both have their ugly sides. That reminds me: you can run the same OCaml code in the top-level, in the bytecode interpreter and through the native code compiler. > Idiomatic OCaml implementations tend to produce more efficient than > Idiomatic Haskell implementations (but Haskell compilers are getting better > and better everyday (for Haskell performances to be good, compilers have to > do lots of clever and not so simple optimizations), Even if Haskell's performance is improved it will remain unpredictable and, consequently, it will continue to be impossible to optimize non-trivial Haskell programs. > and Haskell is faster than most (scripting) languages used these days > anyway). Despite being written in Python, Mercurial is orders of magnitude faster than Darcs. > The Haskell standard library is bigger than the Ocaml one, Does the Haskell stdlib provide a database interface, md5 checksums, marshalling, pretty printing, lexer generator, graphics library, regular expressions, unix interface and weak references? > Haskell program thus tends to > be more terse and "higher-level" (because of reusing a lot of higher-order > combinators in the stdlib): OCaml is also very expressive, but the > simplicity of the stdlib tends to keep people on simpler things. I'm not sure what you mean by "simplicity of the [OCaml] stdlib tends to keep people on simpler things" but there is certainly far more non-trivial software written in OCaml than Haskell, both open source and commercial. > Camlp4 is a flexible and powerful Ocaml preprocessor... And an extensible general-purpose parser generator that is higher-level than Parsec. Camlp4 rocks! -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-14 13:57 ` Jon Harrop @ 2008-08-14 14:06 ` Peng Zang 2008-08-14 14:21 ` Vincent Hanquez 2008-08-14 20:57 ` Nicolas Pouillard 2 siblings, 0 replies; 39+ messages in thread From: Peng Zang @ 2008-08-14 14:06 UTC (permalink / raw) To: caml-list; +Cc: Jon Harrop -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 14 August 2008 09:57:47 am Jon Harrop wrote: > Monads and zippers? They can be useful for the same reasons they are in Haskell. You can always write OCaml code like Haskell code, it's just not always easiest to do it that way. > Even if Haskell's performance is improved it will remain unpredictable and, > consequently, it will continue to be impossible to optimize non-trivial > Haskell programs. That's true, but I think Haskell's point of view is to stop that completely. They want to remove optimization of code and put it into the hands of the compiler. The ideal is to say to the programmer: "don't worry about performance and optimization, just write correct code. The compiler will figure out the rest". Clearly we're not at that point, and perhaps that ideal is a long ways to become true if possible at all. But you gotta give them props for the idea. It would be nice to only care about correctness and not performance. Peng -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) iD8DBQFIpDvifIRcEFL/JewRAvCyAJwNdNYMEx8TKWwwDB1D6X3C5258uwCghlP3 ZaogvTv/CydHsPQ+ETA/+KI= =eQDx -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-14 13:57 ` Jon Harrop 2008-08-14 14:06 ` Peng Zang @ 2008-08-14 14:21 ` Vincent Hanquez 2008-08-14 14:44 ` Jon Harrop 2008-08-14 20:57 ` Nicolas Pouillard 2 siblings, 1 reply; 39+ messages in thread From: Vincent Hanquez @ 2008-08-14 14:21 UTC (permalink / raw) To: Jon Harrop; +Cc: caml-list On Thu, Aug 14, 2008 at 02:57:47PM +0100, Jon Harrop wrote: > > and Haskell is faster than most (scripting) languages used these days > > anyway). > > Despite being written in Python, Mercurial is orders of magnitude faster than > Darcs. (wow, very funny) by the same stupid thinking process: Despite being written in C, CVS is orders of magnitude slower than mercurial. obviously now, python is faster than C. -- Vincent ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-14 14:21 ` Vincent Hanquez @ 2008-08-14 14:44 ` Jon Harrop 0 siblings, 0 replies; 39+ messages in thread From: Jon Harrop @ 2008-08-14 14:44 UTC (permalink / raw) To: Vincent Hanquez, caml-list On Thursday 14 August 2008 15:21:40 you wrote: > On Thu, Aug 14, 2008 at 02:57:47PM +0100, Jon Harrop wrote: > > > and Haskell is faster than most (scripting) languages used these days > > > anyway). > > > > Despite being written in Python, Mercurial is orders of magnitude faster > > than Darcs. > > (wow, very funny) > > by the same stupid thinking process: > > Despite being written in C, CVS is orders of magnitude slower than > mercurial. Is that based upon any measurements? -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-14 13:57 ` Jon Harrop 2008-08-14 14:06 ` Peng Zang 2008-08-14 14:21 ` Vincent Hanquez @ 2008-08-14 20:57 ` Nicolas Pouillard 2008-08-14 21:16 ` Jon Harrop 2 siblings, 1 reply; 39+ messages in thread From: Nicolas Pouillard @ 2008-08-14 20:57 UTC (permalink / raw) To: Jon Harrop; +Cc: Caml_mailing list [-- Attachment #1: Type: text/plain, Size: 517 bytes --] Excerpts from Jon Harrop's message of Thu Aug 14 15:57:47 +0200 2008: > On Thursday 14 August 2008 12:50:43 blue storm wrote: ... > > and Haskell is faster than most (scripting) languages used these days > > anyway). > > Despite being written in Python, Mercurial is orders of magnitude faster than > Darcs. The difference of performances between Darcs and Mercurial is 99% due differences in algorithms not in the implementation language. So this comparison does not make sense! -- Nicolas Pouillard aka Ertai [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 194 bytes --] ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-14 20:57 ` Nicolas Pouillard @ 2008-08-14 21:16 ` Jon Harrop 2008-08-14 21:50 ` Nicolas Pouillard 0 siblings, 1 reply; 39+ messages in thread From: Jon Harrop @ 2008-08-14 21:16 UTC (permalink / raw) To: Nicolas Pouillard, caml-list On Thursday 14 August 2008 21:57:59 you wrote: > Excerpts from Jon Harrop's message of Thu Aug 14 15:57:47 +0200 2008: > > On Thursday 14 August 2008 12:50:43 blue storm wrote: > > > and Haskell is faster than most (scripting) languages used these days > > > anyway). > > > > Despite being written in Python, Mercurial is orders of magnitude faster > > than Darcs. > > The difference of performances between Darcs and Mercurial is 99% due > differences in algorithms not in the implementation language. So this > comparison does not make sense! Only if the choice of algorithm was independent of the language, which is rarely the case. For example, Fortran programmers use arrays when they are unsuitable and their programs can be slower than scripting languages as a consequence. That is Fortran's fault. Does the Darcs implementation overuse singly linked lists because they are more accessible? Are the reported stack overflows indicative of this? I don't know but I certainly wouldn't rule it out as a possibility. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-14 21:16 ` Jon Harrop @ 2008-08-14 21:50 ` Nicolas Pouillard 2008-08-15 0:15 ` Jon Harrop 0 siblings, 1 reply; 39+ messages in thread From: Nicolas Pouillard @ 2008-08-14 21:50 UTC (permalink / raw) To: Jon Harrop; +Cc: Caml_mailing list [-- Attachment #1: Type: text/plain, Size: 1264 bytes --] Excerpts from Jon Harrop's message of Thu Aug 14 23:16:26 +0200 2008: > On Thursday 14 August 2008 21:57:59 you wrote: > > Excerpts from Jon Harrop's message of Thu Aug 14 15:57:47 +0200 2008: > > > On Thursday 14 August 2008 12:50:43 blue storm wrote: > > > > and Haskell is faster than most (scripting) languages used these days > > > > anyway). > > > > > > Despite being written in Python, Mercurial is orders of magnitude faster > > > than Darcs. > > > > The difference of performances between Darcs and Mercurial is 99% due > > differences in algorithms not in the implementation language. So this > > comparison does not make sense! > > Only if the choice of algorithm was independent of the language, which is > rarely the case. > > For example, Fortran programmers use arrays when they are unsuitable and their > programs can be slower than scripting languages as a consequence. That is > Fortran's fault. > > Does the Darcs implementation overuse singly linked lists because they are > more accessible? Are the reported stack overflows indicative of this? I don't > know but I certainly wouldn't rule it out as a possibility. I'm talking about the informal algorithms, their independent of that kind of things... -- Nicolas Pouillard aka Ertai [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 194 bytes --] ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-14 21:50 ` Nicolas Pouillard @ 2008-08-15 0:15 ` Jon Harrop 2008-08-15 1:14 ` Stéphane Glondu ` (2 more replies) 0 siblings, 3 replies; 39+ messages in thread From: Jon Harrop @ 2008-08-15 0:15 UTC (permalink / raw) To: Nicolas Pouillard, caml-list On Thursday 14 August 2008 22:50:19 you wrote: > I'm talking about the informal algorithms, their independent of that kind > of things... Yes, that may well be true. I think we would need in-depth knowledge of Darcs to be able to distinguish between the two. Do any OCaml projects use Darcs, BTW? -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-15 0:15 ` Jon Harrop @ 2008-08-15 1:14 ` Stéphane Glondu 2008-08-17 1:00 ` Luca Saiu 2008-08-19 2:40 ` Paul Snively 2 siblings, 0 replies; 39+ messages in thread From: Stéphane Glondu @ 2008-08-15 1:14 UTC (permalink / raw) To: Jon Harrop; +Cc: Nicolas Pouillard, caml-list Jon Harrop wrote: > Do any OCaml projects use Darcs, BTW? Ocsigen¹ does. ¹ http://ocsigen.org/ -- Stéphane Glondu ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-15 0:15 ` Jon Harrop 2008-08-15 1:14 ` Stéphane Glondu @ 2008-08-17 1:00 ` Luca Saiu 2008-08-19 2:40 ` Paul Snively 2 siblings, 0 replies; 39+ messages in thread From: Luca Saiu @ 2008-08-17 1:00 UTC (permalink / raw) To: Jon Harrop; +Cc: Nicolas Pouillard, caml-list -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jon Harrop wrote: > On Thursday 14 August 2008 22:50:19 you wrote: >> I'm talking about the informal algorithms, their independent of that kind >> of things... > > Yes, that may well be true. I think we would need in-depth knowledge of Darcs > to be able to distinguish between the two. > > Do any OCaml projects use Darcs, BTW? We use Darcs as the VCS for Marionnet. See http://darcs.marionnet.org . Darcs 2 has yet to give us any headache; the "exponential merge" corner cases of version 1 are apparently gone, and now it's quite a pleasure to use. - -- Luca Saiu http://www-lipn.univ-paris13.fr/~saiu GNU epsilon: http://www.gnu.org/software/epsilon Marionnet: http://www.marionnet.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkineB4ACgkQvzOavibF0oYvqQCeMXMygLIy46MFhFJqmOU8n6qJ kDwAn3xb+Ezu6Ky/cdZPgKFLNM/0bVBN =rOZh -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-15 0:15 ` Jon Harrop 2008-08-15 1:14 ` Stéphane Glondu 2008-08-17 1:00 ` Luca Saiu @ 2008-08-19 2:40 ` Paul Snively 2 siblings, 0 replies; 39+ messages in thread From: Paul Snively @ 2008-08-19 2:40 UTC (permalink / raw) To: Jon Harrop; +Cc: Nicolas Pouillard, caml-list -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 FWIW, I still use darcs (darcs 2) exclusively. So far, no other version control system has gotten the relationships among repositories, branching, and merging quite right, although I'm keeping a keen eye on Mercurial's forthcoming "rebase" extension. On Aug 14, 2008, at 5:15 PM, Jon Harrop wrote: > On Thursday 14 August 2008 22:50:19 you wrote: >> I'm talking about the informal algorithms, their independent of >> that kind >> of things... > > Yes, that may well be true. I think we would need in-depth knowledge > of Darcs > to be able to distinguish between the two. > > Do any OCaml projects use Darcs, BTW? > > -- > Dr Jon D Harrop, Flying Frog Consultancy Ltd. > http://www.ffconsultancy.com/products/?e > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkiqMqsACgkQIVlHUIJ6Q02suQCgim9bDlna3r0WYl8Qb2DHQDuy zgEAn1VRvTKhaKIphvp++BJJb3cyASph =Mq8B -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-13 12:48 Haskell vs OCaml circ ular ` (2 preceding siblings ...) 2008-08-14 11:50 ` blue storm @ 2008-08-20 11:33 ` Dr. Thomas Fischbacher 2008-08-21 8:47 ` DooMeeR 3 siblings, 1 reply; 39+ messages in thread From: Dr. Thomas Fischbacher @ 2008-08-20 11:33 UTC (permalink / raw) To: circ ular; +Cc: caml-list circ ular wrote: > What are the advantages/disadvantages when comparing OCaml to Haskell? What are the advantages/disadvantages when comparing a fork to a spoon? -- best regards, Thomas Fischbacher t.fischbacher@soton.ac.uk ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-20 11:33 ` Dr. Thomas Fischbacher @ 2008-08-21 8:47 ` DooMeeR 2008-08-21 10:59 ` David Teller 2008-08-21 13:52 ` Dr. Thomas Fischbacher 0 siblings, 2 replies; 39+ messages in thread From: DooMeeR @ 2008-08-21 8:47 UTC (permalink / raw) To: caml-list > What are the advantages/disadvantages when comparing a fork to a spoon? From Church's thesis, one can easily answer this question: they are equivalent. The reduction is quite easy. A fork can be reduced to a spoon using a fire, an anvil and a hammer, and a spoon can be reduced to a fork using a saw. Hope this helps. -- Romain Bardou ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-21 8:47 ` DooMeeR @ 2008-08-21 10:59 ` David Teller 2008-08-21 13:52 ` Dr. Thomas Fischbacher 1 sibling, 0 replies; 39+ messages in thread From: David Teller @ 2008-08-21 10:59 UTC (permalink / raw) To: DooMeeR; +Cc: caml-list I'm not sure there's confluence if you factor in the resources required for such reduction, though. On Thu, 2008-08-21 at 10:47 +0200, DooMeeR wrote: > > What are the advantages/disadvantages when comparing a fork to a spoon? > > From Church's thesis, one can easily answer this question: they are > equivalent. > > The reduction is quite easy. A fork can be reduced to a spoon using a > fire, an anvil and a hammer, and a spoon can be reduced to a fork using > a saw. > > Hope this helps. > -- David Teller-Rajchenbach Security of Distributed Systems http://www.univ-orleans.fr/lifo/Members/David.Teller Angry researcher: French Universities need reforms, but the LRU act brings liquidations. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2008-08-21 8:47 ` DooMeeR 2008-08-21 10:59 ` David Teller @ 2008-08-21 13:52 ` Dr. Thomas Fischbacher 1 sibling, 0 replies; 39+ messages in thread From: Dr. Thomas Fischbacher @ 2008-08-21 13:52 UTC (permalink / raw) To: DooMeeR; +Cc: caml-list DooMeeR wrote: >>What are the advantages/disadvantages when comparing a fork to a spoon? > > From Church's thesis, one can easily answer this question: they are > equivalent. > > The reduction is quite easy. A fork can be reduced to a spoon using a > fire, an anvil and a hammer, and a spoon can be reduced to a fork using > a saw. So, why at all bother with OCaml if it's equivalent to Basic anyway, or machine language, for that matter? Church's Thesis is often cited for precisely this purpose of cutting off discussions related to differing aspects of programming languages -- sometimes this may even seem a Pawlowian reflex reaction. However, I think Church is a red herring here, as the important aspects of programming languages are not at the language:machine interface, but at the human:language interface. The design of a milk carton certainly does not matter a lot for how well it manages to store milk -- pretty much all of them do that quite well. But it certainly does matter for the question whether I'll spill milk all over the table when I try to put some into my tea (as I did this morning). -- best regards, Thomas Fischbacher t.fischbacher@soton.ac.uk ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml
@ 2008-08-14 13:26 Damien Guichard
0 siblings, 0 replies; 39+ messages in thread
From: Damien Guichard @ 2008-08-14 13:26 UTC (permalink / raw)
To: caml-list
[-- Attachment #1: Type: text/plain, Size: 555 bytes --]
Well said Brian.
Any tutorial is good enough at underlining respective language features.
Haskell has lazy evaluation, Caml has strict evaluation, don't pretend it's a secret and don't ask whether good or bad.
Be responsible, try it yourself if needed, then choose yourself.
- damien
> circ ular wrote:
>
> > What are the advantages/disadvantages when comparing OCaml to Haskell?
>
>
> The biggest disadvantage of comparing Ocaml to Haskell would have to be
> causing a long, pointless flamewar. Offhand, I can't think of an upside.
>
> Brian
[-- Attachment #2: Type: text/html, Size: 1350 bytes --]
^ permalink raw reply [flat|nested] 39+ messages in thread
[parent not found: <fa.e3jKyg6bl9+vTkPgypQ4ZRzEoos@ifi.uio.no>]
* Re: [Caml-list] Haskell vs OCaml [not found] <fa.e3jKyg6bl9+vTkPgypQ4ZRzEoos@ifi.uio.no> @ 2013-03-18 9:08 ` adrian.alexander.may 2013-03-18 9:48 ` Malcolm Matalka 2013-03-26 0:49 ` Kristopher Micinski 0 siblings, 2 replies; 39+ messages in thread From: adrian.alexander.may @ 2013-03-18 9:08 UTC (permalink / raw) To: fa.caml; +Cc: caml-list On Wednesday, 13 August 2008 20:49:17 UTC+8, circ ular wrote: > What are the advantages/disadvantages when comparing OCaml to Haskell? case you of man -> haskell mouse -> ocaml ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2013-03-18 9:08 ` adrian.alexander.may @ 2013-03-18 9:48 ` Malcolm Matalka 2013-03-18 9:59 ` Gabriel Scherer 2013-03-18 11:26 ` Kakadu 2013-03-26 0:49 ` Kristopher Micinski 1 sibling, 2 replies; 39+ messages in thread From: Malcolm Matalka @ 2013-03-18 9:48 UTC (permalink / raw) To: adrian.alexander.may; +Cc: fa.caml, caml-list The biggest advantage for me is Ocaml is simpler than Haskell IMO. adrian.alexander.may@gmail.com writes: > On Wednesday, 13 August 2008 20:49:17 UTC+8, circ ular wrote: >> What are the advantages/disadvantages when comparing OCaml to Haskell? > > case you of > man -> haskell > mouse -> ocaml ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2013-03-18 9:48 ` Malcolm Matalka @ 2013-03-18 9:59 ` Gabriel Scherer 2013-03-18 11:05 ` Adrian May 2013-03-18 11:26 ` Kakadu 1 sibling, 1 reply; 39+ messages in thread From: Gabriel Scherer @ 2013-03-18 9:59 UTC (permalink / raw) To: Malcolm Matalka; +Cc: adrian.alexander.may, fa.caml, caml-list I see no point in keeping this thread going on, given the mediocre way it started. The original question was about feedback on OCaml being used to teach programming, and I think it is good that is answered in detail if it can help in making informed curriculum decisions. Don't hesitate to keep providing data if you think it helps. On the other side, there is no "competition" going on here -- and it's indeed an excellent thing that Haskell, being a beautiful language, is also taught at university (same for SML)! If only there were less Java courses... I'm sure there are interesting things to be said about "Haskell and OCaml" (rather than "vs."), but this is not the way to start it. "Keep Caml and Curry On"! On Mon, Mar 18, 2013 at 10:48 AM, Malcolm Matalka <mmatalka@gmail.com> wrote: > The biggest advantage for me is Ocaml is simpler than Haskell IMO. > > adrian.alexander.may@gmail.com writes: > >> On Wednesday, 13 August 2008 20:49:17 UTC+8, circ ular wrote: >>> What are the advantages/disadvantages when comparing OCaml to Haskell? >> >> case you of >> man -> haskell >> mouse -> ocaml > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2013-03-18 9:59 ` Gabriel Scherer @ 2013-03-18 11:05 ` Adrian May 0 siblings, 0 replies; 39+ messages in thread From: Adrian May @ 2013-03-18 11:05 UTC (permalink / raw) To: Gabriel Scherer; +Cc: Malcolm Matalka, fa.caml, caml-list [-- Attachment #1: Type: text/plain, Size: 1938 bytes --] Actually I was making a serious point, namely, that Haskell forces you to learn the whole FP deal even to write Hello World, whereas Ocaml lets you chicken out into imperative programming at the first hurdle. Which is better? Well I'd say the former because the latter risks building up a code base that doesn't rhyme with itself and a population of programmers who react to one half or the other of the code with either derision or confusion. On 18 March 2013 17:59, Gabriel Scherer <gabriel.scherer@gmail.com> wrote: > I see no point in keeping this thread going on, given the mediocre way > it started. > > The original question was about feedback on OCaml being used to teach > programming, and I think it is good that is answered in detail if it > can help in making informed curriculum decisions. Don't hesitate to > keep providing data if you think it helps. > > On the other side, there is no "competition" going on here -- and it's > indeed an excellent thing that Haskell, being a beautiful language, is > also taught at university (same for SML)! If only there were less Java > courses... > > I'm sure there are interesting things to be said about "Haskell and > OCaml" (rather than "vs."), but this is not the way to start it. > > "Keep Caml and Curry On"! > > On Mon, Mar 18, 2013 at 10:48 AM, Malcolm Matalka <mmatalka@gmail.com> > wrote: > > The biggest advantage for me is Ocaml is simpler than Haskell IMO. > > > > adrian.alexander.may@gmail.com writes: > > > >> On Wednesday, 13 August 2008 20:49:17 UTC+8, circ ular wrote: > >>> What are the advantages/disadvantages when comparing OCaml to Haskell? > >> > >> case you of > >> man -> haskell > >> mouse -> ocaml > > > > -- > > Caml-list mailing list. Subscription management and archives: > > https://sympa.inria.fr/sympa/arc/caml-list > > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > > Bug reports: http://caml.inria.fr/bin/caml-bugs > [-- Attachment #2: Type: text/html, Size: 2867 bytes --] ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2013-03-18 9:48 ` Malcolm Matalka 2013-03-18 9:59 ` Gabriel Scherer @ 2013-03-18 11:26 ` Kakadu 2013-03-19 1:23 ` Francois Berenger 1 sibling, 1 reply; 39+ messages in thread From: Kakadu @ 2013-03-18 11:26 UTC (permalink / raw) To: Malcolm Matalka; +Cc: fa.caml, caml-list Please, don't feed the troll On Mon, Mar 18, 2013 at 1:48 PM, Malcolm Matalka <mmatalka@gmail.com> wrote: > The biggest advantage for me is Ocaml is simpler than Haskell IMO. > > adrian.alexander.may@gmail.com writes: > >> On Wednesday, 13 August 2008 20:49:17 UTC+8, circ ular wrote: >>> What are the advantages/disadvantages when comparing OCaml to Haskell? >> >> case you of >> man -> haskell >> mouse -> ocaml > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2013-03-18 11:26 ` Kakadu @ 2013-03-19 1:23 ` Francois Berenger 2013-03-26 10:36 ` Nicolas Braud-Santoni 0 siblings, 1 reply; 39+ messages in thread From: Francois Berenger @ 2013-03-19 1:23 UTC (permalink / raw) To: caml-list On 03/18/2013 08:26 PM, Kakadu wrote: > Please, don't feed the troll > > On Mon, Mar 18, 2013 at 1:48 PM, Malcolm Matalka <mmatalka@gmail.com> wrote: >> The biggest advantage for me is Ocaml is simpler than Haskell IMO. >> >> adrian.alexander.may@gmail.com writes: >> >>> On Wednesday, 13 August 2008 20:49:17 UTC+8, circ ular wrote: >>>> What are the advantages/disadvantages when comparing OCaml to Haskell? >>> >>> case you of >>> man -> haskell >>> mouse -> ocaml Last time I used it, the Haskell "ecosystem" around the language (tools and libraries) was quite advanced (they had an OPAM-like long time ago for example). Also, the population of Haskell programmers might be bigger (bigger open-source community, easier to find programmers to hire). F. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2013-03-19 1:23 ` Francois Berenger @ 2013-03-26 10:36 ` Nicolas Braud-Santoni 0 siblings, 0 replies; 39+ messages in thread From: Nicolas Braud-Santoni @ 2013-03-26 10:36 UTC (permalink / raw) To: Francois Berenger; +Cc: caml-list [-- Attachment #1: Type: text/plain, Size: 963 bytes --] On 19/03/2013 02:23, Francois Berenger wrote: > On 03/18/2013 08:26 PM, Kakadu wrote: >> Please, don't feed the troll >> >> On Mon, Mar 18, 2013 at 1:48 PM, Malcolm Matalka <mmatalka@gmail.com> >> wrote: >>> The biggest advantage for me is Ocaml is simpler than Haskell IMO. >>> >>> adrian.alexander.may@gmail.com writes: >>> >>>> On Wednesday, 13 August 2008 20:49:17 UTC+8, circ ular wrote: >>>>> What are the advantages/disadvantages when comparing OCaml to >>>>> Haskell? >>>> >>>> case you of >>>> man -> haskell >>>> mouse -> ocaml > > Last time I used it, the Haskell "ecosystem" around the language > (tools and libraries) was quite advanced (they had an OPAM-like > long time ago for example). As a Haskell programmer, I can tell you that Cabal (Haskell's OPAM-like) is somewhat quirky, and can become very painful to work around when hitting some corner-cases. For now, I have had no such experience with OPAM ;) [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2013-03-18 9:08 ` adrian.alexander.may 2013-03-18 9:48 ` Malcolm Matalka @ 2013-03-26 0:49 ` Kristopher Micinski 2013-03-26 2:37 ` Erik de Castro Lopo 1 sibling, 1 reply; 39+ messages in thread From: Kristopher Micinski @ 2013-03-26 0:49 UTC (permalink / raw) To: adrian.alexander.may; +Cc: fa.caml, Caml Mailing List One other potentially unmentioned point is basically that Haskell is call by need and OCaml is call by value. This causes a bit of a headache sometimes (lazy io, etc, etc...), but birthed some cool constructs (such as iteratees). I personally find Haskell *harder* to understand because of all the hoops you have to jump through to be purely functional (but maybe that's just me). Although I haven't personally used it, Camlp4 is nice (and used by research) for implementing language extensions. I'm not sure that GHC is quite as hackable / extensible, but maybe that's just because I'm uninformed about Haskell :-).. Kris On Mon, Mar 18, 2013 at 5:08 AM, <adrian.alexander.may@gmail.com> wrote: > On Wednesday, 13 August 2008 20:49:17 UTC+8, circ ular wrote: >> What are the advantages/disadvantages when comparing OCaml to Haskell? > > case you of > man -> haskell > mouse -> ocaml > > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2013-03-26 0:49 ` Kristopher Micinski @ 2013-03-26 2:37 ` Erik de Castro Lopo 2013-03-26 2:57 ` Kristopher Micinski 0 siblings, 1 reply; 39+ messages in thread From: Erik de Castro Lopo @ 2013-03-26 2:37 UTC (permalink / raw) To: caml-list Kristopher Micinski wrote: > Although I haven't personally used it, Camlp4 is nice (and used by > research) for implementing language extensions. I'm not sure that GHC > is quite as hackable / extensible, but maybe that's just because I'm > uninformed about Haskell :-).. I suspect that Template Haskell is probably very near to Camlp4 in terms of capabilities. Its also relatively widely used, for instance in the Yesod web framework. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/ ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Caml-list] Haskell vs OCaml 2013-03-26 2:37 ` Erik de Castro Lopo @ 2013-03-26 2:57 ` Kristopher Micinski 0 siblings, 0 replies; 39+ messages in thread From: Kristopher Micinski @ 2013-03-26 2:57 UTC (permalink / raw) To: caml-list I agree, but I've found templates in TH to be a bit sticky since they lack a lot of semantic support. Maybe it's just an aversion to quasiquoters from examples I've seen. Although I do understand that within Yesod TH does have quite a bit of success. I guess my only real point was extrapolating from examples of people I know that use camlp4 for language extensions (within a research context) and not TH. I haven't ruminated as to whether TH would suffice for individual instances (probably so, and the people I know simply prefer OCaml..). In any case the newer versions of OCaml actually export the compiler, which makes some other language analysis-y things slightly easier from an API standpoint. Kris On Mon, Mar 25, 2013 at 10:37 PM, Erik de Castro Lopo <mle+ocaml@mega-nerd.com> wrote: > Kristopher Micinski wrote: > >> Although I haven't personally used it, Camlp4 is nice (and used by >> research) for implementing language extensions. I'm not sure that GHC >> is quite as hackable / extensible, but maybe that's just because I'm >> uninformed about Haskell :-).. > > I suspect that Template Haskell is probably very near to Camlp4 in > terms of capabilities. Its also relatively widely used, for instance > in the Yesod web framework. > > Erik > -- > ---------------------------------------------------------------------- > Erik de Castro Lopo > http://www.mega-nerd.com/ > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs ^ permalink raw reply [flat|nested] 39+ messages in thread
end of thread, other threads:[~2013-03-26 10:36 UTC | newest] Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-08-13 12:48 Haskell vs OCaml circ ular 2008-08-13 13:27 ` [Caml-list] " Brian Hurt 2008-08-14 0:09 ` Jon Harrop 2008-08-14 2:46 ` David Thomas 2008-08-14 2:52 ` Erik de Castro Lopo 2008-08-14 10:37 ` Paolo Donadeo 2008-08-14 12:17 ` Jon Harrop 2008-08-14 16:44 ` Erik de Castro Lopo 2008-08-14 11:50 ` blue storm 2008-08-14 12:47 ` David Mitchell 2008-08-14 13:28 ` Peng Zang 2008-08-14 14:01 ` Peng Zang 2008-08-15 2:09 ` blue storm 2008-08-14 13:57 ` Jon Harrop 2008-08-14 14:06 ` Peng Zang 2008-08-14 14:21 ` Vincent Hanquez 2008-08-14 14:44 ` Jon Harrop 2008-08-14 20:57 ` Nicolas Pouillard 2008-08-14 21:16 ` Jon Harrop 2008-08-14 21:50 ` Nicolas Pouillard 2008-08-15 0:15 ` Jon Harrop 2008-08-15 1:14 ` Stéphane Glondu 2008-08-17 1:00 ` Luca Saiu 2008-08-19 2:40 ` Paul Snively 2008-08-20 11:33 ` Dr. Thomas Fischbacher 2008-08-21 8:47 ` DooMeeR 2008-08-21 10:59 ` David Teller 2008-08-21 13:52 ` Dr. Thomas Fischbacher 2008-08-14 13:26 Damien Guichard [not found] <fa.e3jKyg6bl9+vTkPgypQ4ZRzEoos@ifi.uio.no> 2013-03-18 9:08 ` adrian.alexander.may 2013-03-18 9:48 ` Malcolm Matalka 2013-03-18 9:59 ` Gabriel Scherer 2013-03-18 11:05 ` Adrian May 2013-03-18 11:26 ` Kakadu 2013-03-19 1:23 ` Francois Berenger 2013-03-26 10:36 ` Nicolas Braud-Santoni 2013-03-26 0:49 ` Kristopher Micinski 2013-03-26 2:37 ` Erik de Castro Lopo 2013-03-26 2:57 ` Kristopher Micinski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox