Page 1 of 3 123 Last
  • Jump to page:
    #1
  1. No Profile Picture
    Avid lithomancer
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2006
    Location
    Croatia
    Posts
    271
    Rep Power
    44

    Why learn OCaml?


    I just got some book about OCaml (800 pages). Is it worth learning OCaml? What are its main advantages?
  2. #2
  3. No Profile Picture
    Avid lithomancer
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2006
    Location
    Croatia
    Posts
    271
    Rep Power
    44
    Anyone heard for Ocaml?
  4. #3
  5. fork while true;
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2005
    Location
    England, UK
    Posts
    5,538
    Rep Power
    1051
    It'll teach you more about programming from an academic point of view which should make you a better programmer in ordinary languages. The same goes for lisp and haskell. Mozart/Oz is another worth looking at
  6. #4
  7. No Profile Picture
    Avid lithomancer
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2006
    Location
    Croatia
    Posts
    271
    Rep Power
    44
    Thanks for reply, LP.
    I'll take a look at OCaml when i have more time. I'm currently busy with learning PHP/MySQL.

    I googled for Mozart/Oz. It's for "Folding@home" type of applications.

    EDIT: i just noticed that Firefox spell checker marks word googled as invalid. W00T!
  8. #5
  9. fork while true;
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2005
    Location
    England, UK
    Posts
    5,538
    Rep Power
    1051
    I forgot to add smalltalk (pure OOP) to the list. And io (crippled, but ruby and lisp inspired), and erlang (very good networking). These are all languages I want to look at when I get time so I can improve my skills in other languages.

    Programming is a wonderful thing.

    Comments on this post

    • °Oblivion°King° agrees : Programming is life-style :)
    • displeaser agrees : I'm looking at erlang at the moment, very interesting language
  10. #6
  11. No Profile Picture
    Avid lithomancer
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2006
    Location
    Croatia
    Posts
    271
    Rep Power
    44
    What do you think about Scheme? I saw it few years ago somewhere. It has weird way of defining functions.
  12. #7
  13. fork while true;
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2005
    Location
    England, UK
    Posts
    5,538
    Rep Power
    1051
  14. #8
  15. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    OCaml isn't just worth learning because it'll give you a new perspective, that would be selling the language short. OCaml has been around long enough for it to become very fast, complete and capable language .

    For the record OCaml has never really been an academic language (though it's ancestors historically were).

    I know of at least 6 people in passing using OCaml on a daily basis, for real world applications that would normally have been written in C or C++.

    The advantages of using OCaml in place here are obvious to anyone who's looked at the languages but for those who haven't:


    OCaml combines OO and functional programming seamlessly in a (strange) but clear syntax. Along with automatic memory management and excellent bindings (OpenGL for one) this makes OCaml a great language for rapid turn around.

    In typical ML style OCaml allows the creation of very modular programs with optional type declaration (though this isn't required, the compiler will figure out the types at compile time using 'type inference').

    For the mathematically inclined ML is also worth playing with, since it has a very nice numeric stack (though personally I prefer Scheme for this).



    OCaml isn't an industry standard and this tends to make people a little nervous about it, or worse overlook it - especially if they're interested in one thing, getting work. I think this is a bad idea .

    In reality the ML family of languages are amazingly clear and widely regarded as close to perfect for mission critical systems - being good for writing programs which must be correct!

    I'm not claiming to be an expert in *ML but I would take some time to learn it. I myself am slowly learning it's sister language SML with great enjoyment.

    Please don't take my choice to mean that SML is better than OCaml. I looked at OCaml before SML but at the time I wanted to explore more functional programming rather than OO.


    LP:

    I don't see how Io is a "crippled" version of Lisp and Smalltalk. Care to explain?

    The only thing bad things about Io IME, would be that it's very new and doesn't yet have much in the way of documentation or community, it's run speed and certain annoying inconsistencies.

    These last two can be ignored by virtue of the fact that Io runs as fast as the popular set of dynamic languages, and all of these languages have a number inconsistencies.


    Anyway time to get some sleep.

    Take care guys,

    Mark.


    * Perl, Python, Ruby ...
    programming language development: www.netytan.com Hula

  16. #9
  17. No Profile Picture
    Avid lithomancer
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2006
    Location
    Croatia
    Posts
    271
    Rep Power
    44
    Nice post as always, netytan. I wanted to learn OCaml only to get new perspective. I already have many experience with C#, and it will be my primary language (for desktop applications) for many years. For me, C# has most beautiful syntax of all languages. Probably because i used to spend many hours typing it...
    So, i don't see get any advantages if i use OCaml. And it can't be faster than C#.
    And, C# has good modularity for most projects. OCaml is for extreme cases...

    - This is interesting, btw: http://www.ocaml-tutorial.org/ocaml_and_the_web
  18. #10
  19. fork while true;
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2005
    Location
    England, UK
    Posts
    5,538
    Rep Power
    1051
    It can be and is faster than c#.

    There, are we all happier now?
  20. #11
  21. No Profile Picture
    Avid lithomancer
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2006
    Location
    Croatia
    Posts
    271
    Rep Power
    44
    WTF? Faster that C#?!
    Can you prove that? It's strange.
  22. #12
  23. fork while true;
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2005
    Location
    England, UK
    Posts
    5,538
    Rep Power
    1051
    Originally Posted by °Oblivion°King°
    WTF? Faster that C#?!
    Can you prove that? It's strange.
    I'm just trolling, although I'd be surprised if it were much slower.
  24. #13
  25. No Profile Picture
    Avid lithomancer
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2006
    Location
    Croatia
    Posts
    271
    Rep Power
    44
    You scared S.h.i.t out of me, LP...
    BTW, QBasic is more flexible that Perl.
    1:1
  26. #14
  27. fork while true;
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2005
    Location
    England, UK
    Posts
    5,538
    Rep Power
    1051
    Yeah, I've seen this a lot in qbasic

    [hl=vb]Private Sub Closure
    Return Inline Sub (x as int)
    x = x + 1
    End Sub
    End Sub[/hl]
  28. #15
  29. No Profile Picture
    Avid lithomancer
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2006
    Location
    Croatia
    Posts
    271
    Rep Power
    44

    You should go to brainwashing to forget VB...
    It'll help you a lot.
Page 1 of 3 123 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo