caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Ocaml, a practical functional language?
@ 2008-08-30 19:50 circ ular
  2008-08-30 20:32 ` [Caml-list] " Richard Jones
  2008-09-01 16:36 ` Peng Zang
  0 siblings, 2 replies; 5+ messages in thread
From: circ ular @ 2008-08-30 19:50 UTC (permalink / raw)
  To: caml-list

I have tried a lot of languages but never really felt 100% satisfied.
I really like Python, it makes me very productive but Iwant something
a little more functionally oriented plus a static(optionally declared)
typesystem.

I tried Haskell and I really like it but I find it hard to get used to
some things(like no destructive updates of datastructures outside the
IO Monad).
Ocaml seems a little bit more practical and it is aslo very fast(well
haskell is too).

tried lisp at first but libraries and documentation just werent up to
standards there either.

so far Pytho is the best Ive found (for me) but still isn't satisfied.

could ocaml be what I look for?

i tried installing emacs-mode for ocaml but have problems. anyone done
that on windows and can post how?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Caml-list] Ocaml, a practical functional language?
  2008-08-30 19:50 Ocaml, a practical functional language? circ ular
@ 2008-08-30 20:32 ` Richard Jones
  2008-09-01 16:36 ` Peng Zang
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Jones @ 2008-08-30 20:32 UTC (permalink / raw)
  To: circ ular; +Cc: caml-list

On Sat, Aug 30, 2008 at 09:50:30PM +0200, circ ular wrote:
> i tried installing emacs-mode for ocaml but have problems. anyone done
> that on windows and can post how?

There's a beginners list for these sorts of questions:

> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

We also have some resources for Windows users here:

http://cocan.org/windows

Rich.

-- 
Richard Jones
Red Hat


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Caml-list] Ocaml, a practical functional language?
  2008-08-30 19:50 Ocaml, a practical functional language? circ ular
  2008-08-30 20:32 ` [Caml-list] " Richard Jones
@ 2008-09-01 16:36 ` Peng Zang
  2008-09-01 17:48   ` Luca de Alfaro
  1 sibling, 1 reply; 5+ messages in thread
From: Peng Zang @ 2008-09-01 16:36 UTC (permalink / raw)
  To: caml-list, circ ular

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Saturday 30 August 2008 03:50:30 pm circ ular wrote:
> I have tried a lot of languages but never really felt 100% satisfied.
> I really like Python, it makes me very productive but Iwant something
> a little more functionally oriented plus a static(optionally declared)
> typesystem.
>
> I tried Haskell and I really like it but I find it hard to get used to
> some things(like no destructive updates of datastructures outside the
> IO Monad).
> Ocaml seems a little bit more practical and it is aslo very fast(well
> haskell is too).
>
> tried lisp at first but libraries and documentation just werent up to
> standards there either.
>
> so far Pytho is the best Ive found (for me) but still isn't satisfied.
>
> could ocaml be what I look for?

I think OCaml is what you are looking for.  I went through a similar search 
for a comfortable language.  My order was a bit different, lisp first, then 
python, then OCaml, then played a bit with Haskell but am sticking with 
OCaml.

I find OCaml to be a great compromise.  Haskell is cool, but it forces you to 
do things in certain ways and use a lot of abstraction which often seems 
overkill, making simple things much harder than they should be.  I really 
like how easy things are in Python but large programs I find are impossible 
to maintain because it's not statically typed (it's also slow.. but that 
might have been ok).  Lisp is really great with what you can do and many 
simple things are simple, but it doesn't have the scaffolding to let you 
scale up to big stuff (missing libs and stuff).  OCaml has been great.  It 
has its drawbacks and yucky corner cases like all languages.  Overall though, 
it's been good and I've been able to find reasonable workarounds for things I 
don't like.  I encourage you to give it a serious try.

There's a great book on OCaml here:

  http://www.cs.caltech.edu/courses/cs134/cs134b/book.pdf

The best emacs mode for ocaml is tuareg mode here:

  http://www-rocq.inria.fr/~acohen/tuareg/

I also write some additional on top of tuareg mode to be more like the SLIME 
mode for lisp but it's alpha (mostly because I wrote it for myself and 
packaging it and making robust is a lot of work that I'm too busy to handle) 
so I don't really recommend it yet.

Peng
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)

iD8DBQFIvBosfIRcEFL/JewRAv4kAJ40DMoR1GZd1LagWMwR1umbEglLVwCfaMoP
F9jaCP+f2iJvqU/ZxVs+Czs=
=k9FZ
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Caml-list] Ocaml, a practical functional language?
  2008-09-01 16:36 ` Peng Zang
@ 2008-09-01 17:48   ` Luca de Alfaro
  2008-09-01 18:34     ` Ulf Wiger (TN/EAB)
  0 siblings, 1 reply; 5+ messages in thread
From: Luca de Alfaro @ 2008-09-01 17:48 UTC (permalink / raw)
  To: peng.zang; +Cc: caml-list, circ ular

[-- Attachment #1: Type: text/plain, Size: 4588 bytes --]

I also cast my vote for Ocaml.
Ocaml is the best compromise between pleasure of coding, speed of code, the
compiler working for you (strong type checking = most bugs found at compile
time).  Memory management is much better than in Python.
I particularly favor Ocaml for largish projects.  There, the type system
helps you gain confidence that the part of the system that you did not touch
in a change (typically, 99%) is unaffected by the change.  This makes
debugging and development much easier and painless.  I certainly would not
imagine any more developing in languages where any change may break far-away
things without warning.

And where else can you find a debugger that can execute code (or give you
the impression it does) backwards?
This is invaluable when trying to find things like where an exception is
thrown: you simply run the code until it exits throwing the exception, then
you back off a few steps until you find what is throwing the exception and
why.  C programmers grappling with Segmentation Faults are very surprised to
see this style of debugging!
And even though Ocaml was born as a functional language, I am happy using it
even for code that has to access databases and interact with the web; see
http://trust.cse.ucsc.edu/WikiTrust .

The one drawback of Ocaml is that it is harder to find developers for it.
But this can be an advantage as well: since the barrier to entry is slightly
higher, a typical Ocaml programmer tends to be a better programmer than a
typical perl or C++ programmer, in my limited experience.

Luca

On Mon, Sep 1, 2008 at 9:36 AM, Peng Zang <peng.zang@gmail.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> On Saturday 30 August 2008 03:50:30 pm circ ular wrote:
> > I have tried a lot of languages but never really felt 100% satisfied.
> > I really like Python, it makes me very productive but Iwant something
> > a little more functionally oriented plus a static(optionally declared)
> > typesystem.
> >
> > I tried Haskell and I really like it but I find it hard to get used to
> > some things(like no destructive updates of datastructures outside the
> > IO Monad).
> > Ocaml seems a little bit more practical and it is aslo very fast(well
> > haskell is too).
> >
> > tried lisp at first but libraries and documentation just werent up to
> > standards there either.
> >
> > so far Pytho is the best Ive found (for me) but still isn't satisfied.
> >
> > could ocaml be what I look for?
>
> I think OCaml is what you are looking for.  I went through a similar search
> for a comfortable language.  My order was a bit different, lisp first, then
> python, then OCaml, then played a bit with Haskell but am sticking with
> OCaml.
>
> I find OCaml to be a great compromise.  Haskell is cool, but it forces you
> to
> do things in certain ways and use a lot of abstraction which often seems
> overkill, making simple things much harder than they should be.  I really
> like how easy things are in Python but large programs I find are impossible
> to maintain because it's not statically typed (it's also slow.. but that
> might have been ok).  Lisp is really great with what you can do and many
> simple things are simple, but it doesn't have the scaffolding to let you
> scale up to big stuff (missing libs and stuff).  OCaml has been great.  It
> has its drawbacks and yucky corner cases like all languages.  Overall
> though,
> it's been good and I've been able to find reasonable workarounds for things
> I
> don't like.  I encourage you to give it a serious try.
>
> There's a great book on OCaml here:
>
>  http://www.cs.caltech.edu/courses/cs134/cs134b/book.pdf
>
> The best emacs mode for ocaml is tuareg mode here:
>
>  http://www-rocq.inria.fr/~acohen/tuareg/<http://www-rocq.inria.fr/%7Eacohen/tuareg/>
>
> I also write some additional on top of tuareg mode to be more like the
> SLIME
> mode for lisp but it's alpha (mostly because I wrote it for myself and
> packaging it and making robust is a lot of work that I'm too busy to
> handle)
> so I don't really recommend it yet.
>
> Peng
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.7 (GNU/Linux)
>
> iD8DBQFIvBosfIRcEFL/JewRAv4kAJ40DMoR1GZd1LagWMwR1umbEglLVwCfaMoP
> F9jaCP+f2iJvqU/ZxVs+Czs=
> =k9FZ
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> 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
>

[-- Attachment #2: Type: text/html, Size: 5754 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Caml-list] Ocaml, a practical functional language?
  2008-09-01 17:48   ` Luca de Alfaro
@ 2008-09-01 18:34     ` Ulf Wiger (TN/EAB)
  0 siblings, 0 replies; 5+ messages in thread
From: Ulf Wiger (TN/EAB) @ 2008-09-01 18:34 UTC (permalink / raw)
  To: Luca de Alfaro; +Cc: caml-list

Luca de Alfaro skrev:
> And where else can you find a debugger that can execute code
 > (or give you the impression it does) backwards?
> This is invaluable when trying to find things like where an 
 > exception is thrown: you simply run the code until it exits
 > throwing the exception, then you back off a few steps until
 > you find what is throwing the exception and why.


FWIW, Omnis has had this since the early 90's.

http://www.omnis.net/products/studio/index.html?detail=whyomnis

(I think that's the successor of the Omnis 5 and 7 that I used
back then.)

I can certainly vouch for the amazing utility of such debugging.
It is priceless! I didn't know Ocaml could do that.

BR,
Ulf W


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-09-01 18:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-30 19:50 Ocaml, a practical functional language? circ ular
2008-08-30 20:32 ` [Caml-list] " Richard Jones
2008-09-01 16:36 ` Peng Zang
2008-09-01 17:48   ` Luca de Alfaro
2008-09-01 18:34     ` Ulf Wiger (TN/EAB)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).