it's blazing fast. strict (not like the other shit), french.
it supports:
functional style (yay)
imperative programing (because mutation is essential)
and a sane OOP (seriously is one sane OOP, is not ambitious is just useful)
pattern matching is great. i would love to see a OS with it's entire userland written in this.
but i don't why haven't catch on?, what is your excuse Prog
>>14
And you're still a stupid shit who has no possible future as a computer programmer. I think you need to just shut up and reexamine life after college you fucking moron.
Name:
Anonymous2012-01-13 16:14
'
>dynamic typing
. . . okay. . . '
>no parentheses around arguments
``Hmm, I have an idea! Let's take out a greatly structuring part of the generally accepted treding syntax so if we want to call functions in the middle of an expression it looks like messy shit and it unmaintainabe! Yay!''
No.
/pork/ will think that I'm trolling, but I'm not, or maybe I am without knowing it, but I don't really care.
The benchmark for a language ought to be the framerate you get in a first-person shooter with a given scene, screen resolution, graphics hardware, etc... And that list of "givens" should be constantly updated to be roughly competitive with the actual first-person shooters released in the previous 12 months.
All of /prog/'s favorite toy languages would come in somewhere around six orders of magnitude slower than C++, finally allowing for a realistic discussion of programming languages. And >>1 would have the grand mystery of why OCaml hasn't taken the world by storm solved.
>>16
It's just curried syntax. It's not like you can't use parens to group expressions. Not that you have to.
>>21
OCaml consistently performs within an order of magnitude of C++.
>>23
Hm, >>13 made a point about OCaml that holds for Perl. I'm not sure why it's an issue though. There's the windows support issue (Perl had activestate), but then there are cross-compilers.
>>13 simple, it doesn't has a standard, ocaml as a language solely exist as whatever the inria implementation decides to compile.
Its a valid reason... but half of the TIOBE top20 is exactly like this!
At least its open sauce so the language won't ever technically die.
Oh, I used for some time, after meeting some users in one of the ACM ICPCs.
Name:
Anonymous2012-01-13 23:29
It's my favorite language. It just makes so much sense both practically and in terms of beauty and clarity. Just too bad there is so little code (as in libraries) out there in it. I try to use it as much as possible but since there are no libraries and stuff, that means I use it to code up stand alone programs that do some simple little thing. Pretty much forced to use Matlab now due to my research. Only other option is C++ and I can't stand C++. Well also python, but can't stand that either.
Name:
Anonymous2012-01-14 0:01
>>30
I'am learning to use it, but the documentation seems a little bit rough, can you recommend me a book?
Because Ruby supports all of those and doesn't look like crap while doing them. And if you care about speed while retaining those features, you should be using C++11
Name:
Anonymous2012-01-14 1:09
woah. let me get this straight
lispers fight against perl
ocamlers fight against ruby
who fights against python?
Name:
Anonymous2012-01-14 1:13
>>31
I was already familiar with functional programming when I came across Ocaml, so I didn't have too much trouble getting started on it -- just looked that tutorials, documentation, and other people's code. For libraries with some documentation, this site has a few: http://godi.camlcity.org/godi/index.html (It also has a package manager for the libraries).
I don't know of any good Ocaml books but there are a lot of books that use SML. SML is very close of Ocaml except that it doesn't have the object oriented part. Though there isn't that much code in SML that you can find. Some famous books that use SML: "The Little MLer", "Purely Functional Data Structures"(advanced), "ML for the Working Programmer".
If you are a beginner (like sophomore in college level), maybe you can read "Introduction to Algorithms: A Creative Approach" along with "ML for the Working Programmer" to get hardcore into algorithms and functional programming.
Name:
Anonymous2012-01-14 1:17
>>34
Python is disgusting. You need to define 2 classes just to create a binary tree in python. It's just ridiculous. Everyone should fight python.
Name:
Anonymous2012-01-14 1:24
>>30
What kind of libs are you missing? I find there is a surprising amount of support for it.
>>31
The docs are pretty rough. You're probably going to want to try everything you can get your hands on and see how much you gain from it. There are a few people commonly recommend, but I don't remember them (I didn't find them amazing myself.)
I prefer using Common Lisp, but I did learn O'Caml. I do like the language(the ML family), but I just find Lisp more comfortable for most general purpose programming.
Name:
Anonymous2012-01-14 2:52
>>34
I don't think the ML circles have much to say about Ruby and certainly not like Lisp circles are notorious for hating on Perl and everything that is not Lisp (and half of everything that is Lisp.) There's just no concept of a threat.
Name:
Anonymous2012-01-14 6:27
Symta:
sum [X@Xs] = X+Xs,r
C/C++:
int sum(int *Xs) {
int I,S;
for(S=I=0; I<Xs[-1]; I++) S+=Xs[I];
return S;
}
OCaml:
let rec sum xs =
match xs with
| [] -> 0
| x :: xs' -> x + sum xs'
Name:
Anonymous2012-01-14 6:38
i would love to see a OS with it's entire userland written in this
OCams --> GC --> slow
I like C++ more because it's faster. Maybe if they removed GC from OCaml I might reconsider.
>>37
It's pretty domain specific. My field is in computer vision and machine learning. There is no way Ocaml will come close what Matlab and C/C++ has in terms of libraries and code. Good start would be bindings to OpenCV, I guess, but Ocaml would have to be really really popular for that to happen.
Name:
Anonymous2012-01-14 23:48
>>49
Lets maintain some lisp code
())()-(*---)+)-)-(*(++?(**+?(*((((+(++)))))))))))))))))))
Name:
Anonymous2012-01-15 0:59
>>53
Yeah, that is fairly specific. Based on the bindings I've found I can only conclude that most OCaml users are not afraid of writing their own bindings, or there are a few prolific people out there writing bindings for the hell of it.
Either way, you're probably not going to see bindings pop up unless you write them yourself, or OCaml becomes more popular like you suggest.