Talk:OCaml

message: A fair portion of this page reads a lot like an advert, between the "colorful" descriptions, performance quotes from one of its developers, and thinly veiled trash talk about other languages... there's a lot of good information in here, but reading this article left me with a pretty bad taste.  I notice some of the other discussion bits talking about what the "C/java/perl/python passerby" would think, so here you have it.  Sorry if this comes off badly, but a lot of this article looks like a sales pitch to me- the programming examples section, however, is quite good; nice work there.
-Sovereign  —Preceding unsigned comment added by 137.112.133.101 (talk) 04:16, 7 September 2009 (UTC)
replies: text: I just took a quick look at the intro and opening sections of the article and I'm not sure I see what you're talking about. In particular, I think the references to other languages are purely factual and not at all "trash talk" (e.g., Java does require explicit type annotations, dynamic language do suffer a performance penalty from runtime safety checks). Could you cite specific POV passages? If the performance quote is problematic, we could cite the performance measurements reported here. There's also some benchmark numbers ("Ray tracer language comparison") reported by Flying Frog Consultancy, but their site is blacklisted by Wikipedia for some reason. Clconway (talk) 01:16, 8 September 2009 (UTC)

text: I don't see the problem either. I can't immediately see anything in the article that isn't objectively correct. OCaml is a pretty well-designed language, so the article does come across as quite positive -- and what's wrong with that? Unless more support can be provided for the assertion of non-neutrality, I'll remove the tag in a few days. --David-Sarah Hopwood ⚥ (talk) 04:22, 25 September 2009 (UTC)

text: Here comes number three... There is NOT a problem with the neutrality of this article.  Personally, I don't much like the OCaml language (I'm a Java/Scala developer) but I do not have a problem with this particular DESCRIPTION of OCaml.  It seems fair and unbiased to me.  It would be nice to add a small "Drawbacks of OCaml" section, written by someone who uses OCaml extensively AND uses at least two other common languages (ex: C/C++/Java/Perl/Python/Objective-C/Ruby/Erlang/Haskell/Scala) -- I suggest this issue be resolved at this time, as the vote now stands 3 to 1 in support of sufficient neutrality. _ _ - Brymancer (talk) 20:25, 8 November 2009 (UTC)
replies: text:  A good place to start for drawbacks might be Brian Hurt's blog post "How OCaml Can Be Improved" (née "Why OCaml Sucks"), which is a constructive critique of the language from an experienced OCaml programmer. There's also OCaml Language Sucks by Sam Steingold, which is a bit less measured. Probably the biggest drawback—one that is recognized by the language designers—is that OCaml has poor support for multiprocessing. Jon Harrop has written a lot on this subject, but his website seems to be on the WP blacklist. Clconway (talk) 17:03, 9 November 2009 (UTC)

text: POV tag removed. A 'criticisms' section would be a good addition, but I don't think there's any need to wait for that to be written before removing the tag. --David-Sarah Hopwood ⚥ (talk) 03:36, 26 November 2009 (UTC)
thread_title: Neutrality contested

message: How about the following:
# Move Ocaml to Objective Caml programming language.
# Move Talk:O'Caml programming language to Talk:Objective Caml programming language.
# Fix redirects etc.
This would avoid debate over the spelling of "OCaml" vs. "Ocaml" vs. "O'Caml". Whether "...programming language" should be part of the title is a matter of discussion; we should go with whatever is the standard for programming language articles. --MarkSweep 02:33, 29 Apr 2005 (UTC)
thread_title: Requested moves

message: Looking at the article in its present state, there are 16 external (non-wikipedia) OCaml-related links in it. Seven of them point to http:// www.ffconsultancy.com, and all of them seem to have been made by a user from the IP 80.229.56.224, which resolves to jdh30.plus.com.
Doing a bit of research, this is the machine of the owner of ffconsultancy.com, Dr. Jon Harrop. This brings up the question whether we actually see here a violation of Wikipedia:What_Wikipedia_is_not rules, as this article might be abused for self-promotion and advertising issues. Doubly so, as there is quite some consensus of Jon Harrop showing quite undue behaviour on the usenet as well as some mailing lists, alienating large parts of the functional community.
I therefore strongly suggest deleting all references to ffconsultancy.com from the article.
:Motion seconded, carried, and implemented. --MarkSweep (call me collect) 22:58, 26 October 2005 (UTC)
thread_title: On Commercials in this article

message: I just wanted to say thanks to everyone who's contributed since my request, especially Mike Lin for his recent overhaul. The page is vastly better now! One small point, the page says "Code generated by OCaml's native code compiler can, in fact, approach the performance of C/C++ on algorithmic tasks". Actually, for many non-trivial programs, OCaml is often much faster than C++, e.g. it can be 10^4 \times faster for set union. - Jon Harrop
: tr1::auto_ptr solves any reasonable worry over copying, and you really should check with more than one implementation of std::set_union, you know. There are probably even (non-standard) functions for calcuating set unions that are significantly faster than OCaml. Referential transparancy is nice, but not a pancea. I have no argument about the prettyness of the code though :) 202.180.83.6 04:23, 10 January 2006 (UTC)
thread_title:  Thanks 

message: The article on exception handling on one hand describes how there are external checkers to see that all exceptions are handled in OCaml, and on the other hand says that OCaml has checked exceptions. I don't know OCaml, but my guess is that the language as it is doesn't have checked exceptions. You could clarify the situation in both articles. Thanks. --TuukkaH 22:14, 15 December 2005 (UTC)
thread_title:  Checked exceptions 

message: I just made a minor edit to the "wide variety of libraries" line. It sounded a little odd to me, considering the breadth of other stdlibs available with, say, Java. Was this warranted? Scotto 20:55, 13 January 2006 (UTC)
replies: text: With perl4caml, OCaml's libraries are a strict superset of Perl's libs, which I'd say makes them pretty extensive. Richard W.M. Jones 09:21, 6 March 2006 (UTC)
thread_title: Libraries

message: I just made a minor edit to the Triangle (graphics) example, "simple.ml". At least on Unix systems it is important to get the case right: +lablGL instead of +lablgl. Cragwolf 02:26, 7 June 2006 (UTC)
replies: text: I installed from source, and that process installs lablGL as default, although I suppose you could configure it to install lablgl. Cragwolf 00:53, 9 June 2006 (UTC)
thread_title:  Case 

message: New proposal: move to Objective Caml. This is the full name, according to .
===Survey===
:Add *Support or *Oppose followed by an optional one-sentence explanation, then sign your opinion with ~~~~
*Support Qwertyus 19:02, 20 July 2006 (UTC)
replies: text: Add any additional comments
This article has been renamed as the result of a move request.
Vegaswikian 22:30, 28 July 2006 (UTC)
thread_title: Move to Objective Caml

message: :Add *Support or *Oppose followed by an optional one-sentence explanation, then sign your opinion with ~~~~
*Support Qwertyus 19:02, 20 July 2006 (UTC)
thread_title: Survey

message: :Add any additional comments
This article has been renamed as the result of a move request.
Vegaswikian 22:30, 28 July 2006 (UTC)
thread_title: Discussion

message: The languages used in Classes Préparatoires in France are many, and depend on the type of Classes Préparatoires considered. However, Objective Caml is not used in any significant way: speciality Computer Science courses are taught in Caml Light (official requirement, as far as I know), non-speciality Computer Science courses in scientific Classes Préparatoires are given in a mix of Maple and Java (no official requirements there), while Computer Science in commercial Classes Préparatoires is done in Pascal. --ToohrVyk 13:53, 14 October 2006 (UTC)
thread_title:  Applications 

message: === Hello world ===
In the example it state "compile to byte code" 
Should that really state byte code and not machine code?
Thanks.  —Preceding unsigned comment added by 85.229.8.234 (talk) 03:31, 3 September 2007 (UTC)
replies: text: "Byte code" is correct. ocamlc is the byte code compiler; ocamlopt is the native code compiler. It makes no difference which you use for this example. Clconway 21:27, 3 September 2007 (UTC)
thread_title:  Errors when trying the Examples 

message: In the example it state "compile to byte code" 
Should that really state byte code and not machine code?
Thanks.  —Preceding unsigned comment added by 85.229.8.234 (talk) 03:31, 3 September 2007 (UTC)
replies: text: "Byte code" is correct. ocamlc is the byte code compiler; ocamlopt is the native code compiler. It makes no difference which you use for this example. Clconway 21:27, 3 September 2007 (UTC)
thread_title:  Hello world 

message: I don't know enough OCaml to be 100% sure, but shouldn't the last line in the Birthday Paradx Example end with two semi-colons? 
  birthday_paradox 1.0 1 ;;
Also, the factorial example gives an error when I try it:
  # let rec fact n =</br>
        if n =/ Int 0 then Int 1 else n */ fact(n -/ Int 1);;</br>
Unbound value =/
BioGeek 22:46, 29 January 2007 (UTC)
thread_title:  Factorial 

message: Quicksort implementation in article is not proper: slow and runs out of stack space really fast. The proper way to implement quicksort would be something like
  let rec qsort ?(acc=[]) = function
    | [] -> acc
    | [h] -> h :: acc
    | h :: tl -> 
        let part1, part2 = List.partition ( (<) h) tl in
          qsort ~acc:(h :: qsort ~acc:acc part1) part2
The original algorithm puts the whole built tree on stack, this one basically keeps there one branch only.  —Preceding unsigned comment added by 91.152.71.47 (talk) 18:44, 23 August 2010 (UTC)
thread_title:  Quicksort 

message: The rotation matrix should be reset before drawing each frame, otherwise errors accumulate. See http://caml.inria.fr/pub/ml-archives/caml-list/2007/04/c8c30ba5b7e7f446cbb789cd50c052eb.en.html. I fixed it. --Martin 20:39, 12 April 2007 (UTC)
thread_title:  OpenGL triangle 

message: I noticed that the link to the "Books about OCaml" page on the official OCaml site no longer works (it now just leads to the home page). That's unfortunate, as linking only to that page seemed to be a reasonable solution to me. In the absence of that I agree with parts of both sides of this argument, in that we need to link to all of the books or none of them.  But is there such an index to OCaml books page on ocaml-tutorial.org? Say, that's a wiki...hint, hint. --Mike Lin 13:37, 9 April 2007 (UTC)
replies: text: Yes. I'm much happier to see equal treatment of external links. I've deleted the broken link BTW. I think this article already has too many miscellaneous links at the bottom so I'm not going to add another one to a books page. Readers can Google for them. Jon Harrop 15:26, 9 April 2007 (UTC)

text: Would this be a replacement link? http://caml.inria.fr/about/books.en.html Since it's not WP's purpose to be such a directory, an external link to the official page would be clearly preferable to a listing in the article. Femto 15:01, 9 April 2007 (UTC)
replies: text: That book list is out of date: it lacks Practical OCaml and OCaml for Scientists. Probably better to not even refer to a list of books. People can find them easily enough using Google or the OCaml-specific Wiki that Mike cited. What if I put an up-to-date book list on ffconsultancy.com? ;-) Jon Harrop 15:26, 9 April 2007 (UTC)
thread_title: Books

message: Why does Functors link to function object in the article? As stated in the parens a functor in ocaml is a parametric module and not some kind of function object like a closure.  —Preceding unsigned comment added by 139.18.147.97 (talk) 22:49, 16 October 2007 (UTC)
thread_title: Functors

message: AFAICS The article does not say that OCaml is eager or lazy at all.
AaronNGray (talk)
: OCaml is strict/eager/call-by-value, which makes it completely unremarkable, as this is by far the most common choice in mainstream programming languages. The standard support for laziness through lazy/force may be notable. Clconway (talk) 01:29, 24 November 2007 (UTC)
thread_title:  eagerness 

message: Anyone know how to pronounce 'ocaml'? Perhaps this info should be provided. (Originally asked by 75.145.118.157)
Clconway (talk) 01:37, 12 November 2008 (UTC)
replies: text: The pronunciation is "oh-Camel". Clconway (talk) 01:39, 12 November 2008 (UTC)

text: Added a note to the beginning of the article. Clconway (talk) 13:10, 12 November 2008 (UTC)
thread_title:  Pronounce? 

message: Are there any "killer apps" written by OCaml code yet. There should be. Said: Rursus (☻) 14:16, 1 January 2009 (UTC)
replies: text: I think the notion of "killer app" isn't applicable here: a "killer app" is usually an application that drives users towards a platform/OS. The only programming language I can think of that really has a "killer app" is Ruby and Rails: people use Ruby (whatever its advantages/disadvantages) in order to gain access to the Rails framework. The most well-known open source applications written in OCaml are probably Coq, Ocsigen, and Hevea. None of them are "killer" in this sense. In my little corner of the world CIL is close to being a "killer app"—it is far and away the nicest, easiest way to write analyses for C programs and you have to use OCaml to take advantage of it. (But, of course, my little corner of the world is very, very little. Not very "killer".) Clconway (talk) 17:31, 2 January 2009 (UTC)
replies: text:  I believe haXe and mtasc are well-known too, and they are written in OCaml. Spidermario (talk) 14:32, 2 September 2009 (UTC)
thread_title: Killer apps?

message: The following section was removed from the article Boolean data type:begin removed text
----
----
Ocaml has a bool type that has true and false values.
# 1 = 1 ;;
- : bool = true
Like other enumerated types, a value of this type uses a word of memory.
----
----
end removed textIs there a place for this text in the Objective-Caml-related articles? Perhaps in the Wikibook? Thanks, and all the best, --Jorge Stolfi (talk) 23:49, 30 December 2009 (UTC)
thread_title:  Stuff removed from Boolean data type article 

message: When testing OCaml example code for the newly-added section OCaml#Higher-order_functions, I obtained answers from my Linux OCaml 3.12.1 interpreter that seemed counter-intuitive to me.
  # let inc (x : int) : int = x + 1 ;;                      (* some toy int->int function to be operated on by higher-order fcts. *)
  val inc : int -> int = <fun>
  # let twice (f : 'a -> 'a) = fun (x : 'a) -> f (f x) ;;   (* 1st higher-order function *)
  val twice : ('a -> 'a) -> 'a -> 'a = <fun>
  # let add2 = twice inc ;;                                 (* apply it to (inc) *)
  val add2 : int -> int = <fun>
  # twice;;                                                 (* demonstrate that type of (twice) didn't get instatiated by applying it to (inc), as expected *)
  - : ('a -> 'a) -> 'a -> 'a = <fun>
  # let fourtimes = twice twice;;                           (* apply (twice) to itself to obtain 2nd higher-order function *)
  val fourtimes : ('_a -> '_a) -> '_a -> '_a = <fun>
  # let add4 = fourtimes inc;;                              (* apply that to (inc) *)
  val add4 : int -> int = <fun>
  # fourtimes;;                                             (* demonstrate that type of (fourtimes) does get instatiated by applying it to (inc), why is that?! *)
  - : (int -> int) -> int -> int = <fun>
  # twice;;                                                 (* type of (twice) still uninstantiated, as expected *)
  - : ('a -> 'a) -> 'a -> 'a = <fun>
I wonder if it is ok that the type of fourtime changes after it has been applied to inc (3rd line from below). Could any OCaml expert check whether this is coherent with the language definition, and if yes, explain in the higher-order fct section, why? Jochen Burghardt (talk) 11:19, 14 June 2013 (UTC)
replies: text: For ulterior references, the problem was the value restriction: with the previous definition of "fourtimes", "fourtimes" was not polymorphic but had type "('_a -> '_a) -> '_a -> '_a". The underscore prefix in the type "'_a" indicates that this type is weakly polymorphic. In other words, "'_a" is not a polymorphic type variable but a temporary placeholder for an unknown at this time type. Applying "fourtimes" to "inc" told the compiler that this unknown type "'_a" was in fact "int". To fix this problem, a classical solution is to rewrite the definition of fourtimes to "let fourtimes f = (twice twice) f" in order to let the type system know that "fourtimes" is a function with no hidden mutable state. Octachron (talk) 14:58, 15 July 2016 (UTC)
thread_title:  Higher-order functions and type inference 

message: I see in their repo many cpp source files, where can i find ocaml files?--Darktrym (talk) 19:17, 14 March 2015 (UTC)
thread_title:  Facebook and hack usage 

message: — Assignment last updated by Doshir (talk) 15:17, 3 October 2022 (UTC)
thread_title: Wiki Education assignment: Public Writing