Re: [Haskell-cafe] Haskell vs. OCaml (was: Strings in Haskell)

2007-01-23 Thread Martin Jambon
On Tue, 23 Jan 2007, Alexy Khrabrov wrote: I wonder if that's another reason OCaml is used in a(t least one) hedge fund -- why Jane St. preferred OCaml to Haskell, I wonder? Was it the state of affairs then that OCaml was more efficient (? -- WAGuess), and would they prefer Haskell now? I'm tr

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-29 Thread Albert Lai
I particularly like OCaml's provision of subtyping. As a member of the ML family, it's module system is also quite formidable. Of course the imperative constructs are also pretty convenient when you just want to be quirky. But I miss the monad do-notation. ___

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-25 Thread Lennart Augustsson
Branimir Maksimovic wrote: Great! what are constrains on [begin..end] could they be some type which supports (+) , but not Int. Anything in the Enum class (so it doesn't even have to support (+)). Many things are in the Enum class. Last question is: Does creation of list of functions humpers p

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-25 Thread Glynn Clements
Branimir Maksimovic wrote: > >Could you give an example of a loop you find awkward in Haskell? > > Well I want simple loop for(int i =0;i<10;++i)doSomething(i); mapM_ doSomething [0..9] -- Glynn Clements <[EMAIL PROTECTED]> ___ Haskell-Cafe

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-25 Thread Daniel Carrera
Branimir Maksimovic wrote: Well I want simple loop for(int i =0;i<10;++i)doSomething(i); in haskell that would be for begin end f | begin /= end = do {f begin ; for (begin+1) end f} | otherwise = return () How about: result = [ doSomething(i) | i <- [0..9] ] I guess it depend

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-25 Thread Tomasz Zielonka
On Sun, Dec 25, 2005 at 11:09:51AM +, Branimir Maksimovic wrote: > >Or just 'mapM_ doSomething [1..10]' (: > > Neet! However would it be more efficient for, say, 1 million iterations? > Anyway I have to look for map functions. I'm learning step by step > from tutorials :) I remember I was imp

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-25 Thread Branimir Maksimovic
From: Lemmih <[EMAIL PROTECTED]> To: Branimir Maksimovic <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED], Haskell-Cafe@haskell.org Subject: Re: [Haskell-cafe] Haskell vs OCaml Date: Sun, 25 Dec 2005 11:43:56 +0100 On 12/25/05, Branimir Maksimovic <[EMAIL PROTECTED]> wrote: >

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-25 Thread Branimir Maksimovic
From: Matt Collins <[EMAIL PROTECTED]> To: "Branimir Maksimovic" <[EMAIL PROTECTED]> CC: Haskell-Cafe@haskell.org Subject: Re: [Haskell-cafe] Haskell vs OCaml Date: Sun, 25 Dec 2005 21:42:35 +1100 Perhaps something like for :: Int -> Int -> (Int ->

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-25 Thread Lemmih
On 12/25/05, Branimir Maksimovic <[EMAIL PROTECTED]> wrote: > > > > >From: Lennart Augustsson <[EMAIL PROTECTED]> > >To: Branimir Maksimovic <[EMAIL PROTECTED]> > >CC: [EMAIL PROTECTED], Haskell-Cafe@haskell.org > >Subject: Re: [Haskell-cafe]

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-25 Thread Matt Collins
TECTED]> To: Branimir Maksimovic <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED], Haskell-Cafe@haskell.org Subject: Re: [Haskell-cafe] Haskell vs OCaml Date: Sun, 25 Dec 2005 10:25:44 +0100 Branimir Maksimovic wrote: I've found that Haskell is pretty good in implementing recursive algorithms

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-25 Thread Branimir Maksimovic
From: Lennart Augustsson <[EMAIL PROTECTED]> To: Branimir Maksimovic <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED], Haskell-Cafe@haskell.org Subject: Re: [Haskell-cafe] Haskell vs OCaml Date: Sun, 25 Dec 2005 10:25:44 +0100 Branimir Maksimovic wrote: I've found that Haskell

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-25 Thread Lennart Augustsson
Branimir Maksimovic wrote: I've found that Haskell is pretty good in implementing recursive algorithms. Problem cames when one want's to implement non recursive algorithm by terms of recursion as Haskell does not support loops. Perhaps if we can get loops, situation will improve, but then that w

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-24 Thread Branimir Maksimovic
From: Daniel Carrera <[EMAIL PROTECTED]> To: Haskell-Cafe@haskell.org Subject: Re: [Haskell-cafe] Haskell vs OCaml Date: Sat, 24 Dec 2005 20:07:00 + Tomasz Zielonka wrote: When it comes to Haskell, speed is mostly an implementation issue. I just took another look at th

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-24 Thread Tomasz Zielonka
On Sat, Dec 24, 2005 at 03:11:06PM +, Daniel Carrera wrote: > Tomasz Zielonka wrote: > >There are many differences (Haskell on the left): > >- pure / impure > > Let's see if I understand this one. Haskell and OCaml both treat > functions as first class objects, including the ability to pass

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-24 Thread Daniel Carrera
Tomasz Zielonka wrote: When it comes to Haskell, speed is mostly an implementation issue. I just took another look at this. By "implementation issue" do you mean the person who implements the compiler or the program being compiled? If the latter... other emails here suggest that writing an ef

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-24 Thread Donn Cave
Quoth Tomasz Zielonka <[EMAIL PROTECTED]>: ... | There are many differences (Haskell on the left): Might also mention foreign (C) function interface (FFI.) ocaml's is I would say average, but ghc's is outstanding, really a different level of support altogether. With regard to the syntax - aside

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-24 Thread Daniel Carrera
Hal Daume III wrote: That said, I use O'Caml for all of my non-Perl coding. Why? ... Second, lack of loop support, Lack of loop support? You mean like while loops and for loops? This suggests that some problems are easier to solve with loops than using lists and recursion. (Of course, w

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-24 Thread Daniel Carrera
Tomasz Zielonka wrote: When it comes to Haskell, speed is mostly an implementation issue. Of course, there are many problems with making Haskell programs run fast, but on the other hand there are also many opportunities. For example recent developments of GHC promise that Haskell will be one of t

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-24 Thread David F. Place
It would be very instructive to know the story behind LexiFi's decision to use OCAML for their implementation. The original work was done in Haskell and seemed to take good advantage of lazy evaluation. Does anybody know this story? http://www.lexifi.com/ http://www.lexifi.com/Downloads

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-24 Thread Joel Reymont
Hal, What is the syntactic sugar that you are lacking with arrays? Also, do loops matter if they can be emulated with recursion? Thanks, Joel On Dec 24, 2005, at 12:46 AM, Hal Daume III wrote: That said, I use O'Caml for all of my non-Perl coding. Why? Because I need lots of arra

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-24 Thread Tomasz Zielonka
On Sat, Dec 24, 2005 at 12:35:21AM +, Daniel Carrera wrote: > Now that I sort of understand Haskell, I was hoping someone could give > me an opinion on OCaml from a Haskell POV. Both are functional and have > fairly clear syntax. OCaml is supposed to be very fast, and Haskell > perhaps is no

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-23 Thread Hal Daume III
You'll probably get a lot of different answers. I think the major difference is the notion of encapsulation used by each. Haskell has type classes and O'Caml has structures/functors and (OO) classes. I personally find type class much nicer. Additionally, I think Haskell's syntax is easier o

[Haskell-cafe] Haskell vs OCaml

2005-12-23 Thread Daniel Carrera
Hi all, Okay, I've been studying Haskell for a few days and I think I have a feel for the language. I completted a course, and wrote a Revers Polish Notation calculator. Now that I sort of understand Haskell, I was hoping someone could give me an opinion on OCaml from a Haskell POV. Both are

Re: [Haskell-cafe] Haskell vs OCaml

2005-05-03 Thread Daniel Carrera
My friend, you just proved that I only have but the fuzziest idea of what functional programming is. :-) Thanks for the info. I'll figure this out eventually. Cheers, Daniel. Marcin 'Qrczak' Kowalczyk wrote: Daniel Carrera <[EMAIL PROTECTED]> writes: Marcin, Are you sure that OCaml is similar to

Re: [Haskell-cafe] Haskell vs OCaml

2005-05-03 Thread Marcin 'Qrczak' Kowalczyk
Daniel Carrera <[EMAIL PROTECTED]> writes: > Marcin, > > Are you sure that OCaml is similar to Haskell? At first glance, it > doesn't even look functional. It looks like an imperative language. It's not purely functional, but it supports algebraic types and first-class functions, uses similar con

Re: [Haskell-cafe] Haskell vs OCaml

2005-05-03 Thread Sebastian Sylvan
On 5/3/05, Daniel Carrera <[EMAIL PROTECTED]> wrote: > Marcin, > > Are you sure that OCaml is similar to Haskell? At first glance, it > doesn't even look functional. It looks like an imperative language. > It is functional, but it's not pure (ie it allows side effects) and doesn't have as nice s

Re: [Haskell-cafe] Haskell vs OCaml

2005-05-03 Thread Daniel Carrera
Marcin, Are you sure that OCaml is similar to Haskell? At first glance, it doesn't even look functional. It looks like an imperative language. Cheers, Daniel. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

[Haskell-cafe] Haskell vs OCaml

2005-05-03 Thread Daniel Carrera
Hey, Marcin just mentioned OCaml as another functional programming language I should keep in mind. Can anyone offer an opinion on how Haskell and OCaml compare? Is OCaml as easy to learn as Haskell? Does it have much the same virtues? I'll go take a look at it. /daniel goes to Google. Cheers, D