Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

What is /prog/s opinion of OCAML

Name: Anonymous 2007-07-21 3:24 ID:iW/qroSS

O`Caml.

Name: Anonymous 2007-07-21 3:24 ID:iW/qroSS

OCaml features: a static type system, type inference, parametric polymorphism, tail recursion, pattern matching, first class lexical closures, functors (parametric modules), exception handling, and incremental generational automatic garbage collection.

Name: Anonymous 2007-07-21 3:35 ID:vAemRTsj

OCaml features: ugly syntax and gay

Name: dddddddddddddddddddd 2007-07-21 3:36 ID:nviE7iK/

Ocaml compiles and runs fast but has ugly syntax compared to Haskell.

That's the main reason why it fails.

Another is that it has a small community, and they're mostly French.

Name: Anonymous 2007-07-21 4:41 ID:56erBxHb

Ocaml is designed by people who wouldn't know "clean" or "consistent" if it raped them in a back alley.

In my case, what broke the camel's back was a global namespace for all records within a module. For those of you not familiar with the terminology, think of being unable to have the same name inside two different structs. Those of you who've ever done 3D (a.x, a.y, a.z!) will be screaming about now.

I can rant and rave all day about all the stupidities in Ocaml, but it's not going to be fixed. Look elsewhere unless you'd like a death by a thousand cuts.

Name: Anonymous 2007-07-21 5:27 ID:Heaven

>what broke the Ocaml's back

Fixed.

Name: Anonymous 2007-07-21 6:22 ID:vAemRTsj

>>6

You ruined it.

Name: Anonymous 2007-07-21 7:19 ID:nWiyBvQ1

>>4
has ugly syntax compared to Haskell
Then it must be *REALLY* ugly.

a global namespace for all records within a module.
Oh lawd is that sum static limitation? Use dynamic languages lol.

Name: Anonymous 2007-07-21 7:56 ID:Kz9SmHAC

>>1
You just used an ``incorrect'' apostrophe.  Apostrophes are indicated by `'', not by the backtick symbol ``'.  Please remember this.

Name: Anonymous 2007-07-21 8:21 ID:CDsPbd9j

O'caml, almost as good as SML

Name: Anonymous 2007-07-21 8:36 ID:Heaven

>>9
You just used “incorrect” double quotation marks. Double quotation marks are indicated by ‘“’ and ‘”’, not by two grave accents ‘``’ and two apostrophes ‘''’. Please remember this.

Name: Anonymous 2007-07-21 9:18 ID:tfNdUpBi

>>11
not by two grave accents ‘``’ and two apostrophes ‘''’
They are in TeX.

Name: Anonymous 2007-07-21 9:19 ID:Heaven

>>11
not in my time

Name: Anonymous 2007-07-21 10:00 ID:vAemRTsj

NOT ON MY WATCH

Name: Anonymous 2007-07-21 11:38 ID:Heaven

>>12
This isn't TeX. Here we only write in BBCODE and ⋃ℕℹℂℴⅆℯ.

Name: Anonymous 2007-07-21 14:10 ID:56erBxHb

Oh lawd is that sum static limitation? Use dynamic languages lol.
Ouch. Either you're clueless, or you just don't read very well.

Reread >>5 a bit more carefully and ask yourself what the first language you think of is when you see the word "struct".

Name: Anonymous 2007-07-21 15:06 ID:Heaven

>>16
I'm gradually realising there are a lot of people in here who have never seen that language.

Name: Anonymous 2007-07-21 21:16 ID:nWiyBvQ1

>>16
No, I was trolling, but what's with struct? It's most commonly seen in C, but how's that related to this thread? Or is it just your way to say "I've read K&R"?

Name: Anonymous 2007-07-21 22:03 ID:1WF9MypZ

>>18
dude, it has nothing to do with static vs. dynamic. use your head a little bit. If >>5 mentioned structs, which are in C, which is not a dynamic language, then how the fuck do you reached that conclusion?

Name: Anonymous 2007-07-21 22:28 ID:nWiyBvQ1

20GET

Name: Anonymous 2007-07-21 22:38 ID:dArJ/JzN

>>18,20
That's all you have to say? Defend your honour, if you have any.

Name: Anonymous 2007-07-21 22:44 ID:IWGPnbYD

ocaml : haskell :: c : java

Name: Anonymous 2007-07-22 1:48 ID:ykFABiez

>>21
Ye' eunach jelly, thou!

Name: Anonymous 2007-07-22 2:55 ID:a6S+f/P4

ocaml : haskell :: calculus : functional analysis

Name: Anonymous 2007-07-22 3:01 ID:/BBxmauy

what : are :: these : for?

Name: Anonymous 2007-07-22 3:04 ID:a6S+f/P4

>>25
I guess you've never solved one of those idiotic iq tests

a : b :: c : d means a is to b as c is to d

Name: Anonymous 2007-07-22 3:05 ID:Heaven

>>26
I guess he couldn't solve any of those idiotic IQ tests.

Name: Anonymous 2007-07-22 3:07 ID:8Hpc8LzK

>>25
:: is the operator in Haskell used to define a variables type

square :: Int -> Int

Name: Anonymous 2007-07-22 3:29 ID:Heaven

>>28
Wow. Just wow.

Name: Anonymous 2007-07-22 17:50 ID:8G+TPm4t

Ocaml has really clean syntax for a statically typed language. It is very clear what is going on the type system helps in debugging. Anyone here is commenting on the superficial and they even get that wrong

let f x = x *. x
let sqr_list l = List.map f l
let sqr_list l = List.map (fun x -> x *. x) l

let rec sqr_list = function
   [] -> []
 | x::xs ->  ( x *. x ) :: sqr_list xs

let sqr_list l =
  let ol = ref [] in
  List.iter (fun x ->
    ol := x :: !ol
  ) l
  List.rev ol

let sqr_list l =
  let ol = ref [] in
  let len = length l in
  for i = 0 to (len - 1) do
    ol := (List.nth l (len - 1 - i)) :: !ol
  done
  ol
;;

So whatever. It all works and you can do the same thing multiple ways in multiple paradigms.

Name: Anonymous 2007-07-22 20:39 ID:2/9FIl0v

Anyone here is commenting on the superficial and they even get that wrong
Until they fix that record issue, I'm not touching it again. That's beyond braindead.

Name: Anonymous 2007-07-22 22:02 ID:YckDbpi2

what is the record issue? The shared namespace? The mutable attributes?

Name: Anonymous 2007-07-22 22:29 ID:vhhuNwz6

"quotes``

Name: Anonymous 2007-07-22 22:30 ID:vhhuNwz6

''quotes``

Name: Anonymous 2007-07-22 22:36 ID:2/9FIl0v

>>32
Fields in different records in the same file cannot have the same name, yes.

Name: Anonymous 2007-07-23 2:39 ID:Heaven

>>6,7
FUCKING LOL'D

Name: Anonymous 2007-07-23 19:26 ID:foMzG+NR

>>30
wut? haskell syntax is cleaner.

Name: Anonymous 2007-07-23 20:02 ID:k639JvPO

O``''Caml

Name: Anonymous 2007-07-24 3:58 ID:Y8pxnauA

One word: the omission of parenthesis is for retards

Name: Anonymous 2007-07-24 6:52 ID:vAmBXIRJ

>>39 is a butt-hurt lisp user

Name: Anonymous 2007-07-24 7:22 ID:Y8pxnauA

>>40
Yes because you're so cool doing f x instead of f(x) (or (f x)), let's see if it's so cool when you need to do f g x. Is it f(g)(x) or f(g(x))? What about f g && h i * j k?

One word: the stupid Perl insanity.

Name: Anonymous 2007-07-24 8:53 ID:Heaven

>>41

f g x = (f g x)
f (g x) = (f (g x))

but yeah, still stupid.

Name: Anonymous 2007-07-24 10:49 ID:vAmBXIRJ

>>41
Noone makes you write "f g && h i * j k", it's your fault for writing it. Lisp allows you not to indent your code, and programmers who don't indent their code are at fault, not lisp. Same with perl parenthesis. It's okay not to restrict users.

Name: Anonymous 2007-07-24 11:30 ID:aPHMTHrz

>>43
By allowing such a thing, you're making sauce fugly, and complicating the rules users need to know to read others' code.

Name: Anonymous 2007-07-24 11:50 ID:vAmBXIRJ

>>44
So you're ignoring my example about indentation, right?

Name: Anonymous 2007-07-24 14:26 ID:a/2RvH+O

>>30
Haskell syntax:

let f x = x *. x
>f x = x * x

sqr_list l = List.map f l
>sqrList = map f

let sqr_list l = List.map (fun x -> x *. x) l
>sqrList = map (\x -> x * x)
or
>sqrList = map (^2)

let rec sqr_list = function
   [] -> []
 | x::xs ->  ( x *. x ) :: sqr_list xs
>sqrList [] = []
>sqrList (x:xs) = x*x : sqrList xs

Name: Anonymous 2007-07-24 14:40 ID:a/2RvH+O

>>45
No, by allowing such ambiguity, the programmer has to learn how the compiler resolves it when reading others code. This sucks.

The fact that there is a (bad) programmer to blame for it doesn't help the one who has to read his code. That's just an excuse not to fix it in the language.

Name: Anonymous 2007-07-24 14:48 ID:vAmBXIRJ

the programmer has to learn how the compiler resolves it when reading others code.

uh what? Well, yes, you obviously have to learn when learning new language. Are you expecting every language to be the same?

Name: Anonymous 2007-07-24 15:10 ID:iLuDVxNr

Wow you fags are still griping about syntax. How superfical. Why don't you all go out and reinvent the wheel again for the 40th time.

Name: Anonymous 2007-07-24 15:20 ID:HyWcYAXl

>>49

They're obviously unemployed wasters

Name: Anonymous 2007-07-24 19:43 ID:a/2RvH+O

the programmer has to learn how the compiler resolves it when reading others code.
uh what? Well, yes, you obviously have to learn when learning new language. Are you expecting every language to be the same?
If the grammar is ambiguous, you have to learn the precedence of the operator, not because you need to use this feature yourself but because others (like retards) might use it.

For some, like * and +, it's obvious, but for others it's a PITA.

Name: Anonymous 2007-07-24 20:26 ID:c8V6JOdd

>>51
LOL WHAT IS OPERATOR PRECEDENCE
(* (+ 1 3 3 5) 2 4 5 (/ 22 4))

Name: Anonymous 2007-07-24 22:47 ID:ASk0swJh

>>49
Why don't you all go out and use Haskell. ML is on the fast track to being a dead language anyway.
fix'd

If you want to play with an ML, SML is a better language than Ocaml.

Name: Anonymous 2007-07-24 23:10 ID:4AWphtn5

>>41
It is pretty obvious after five minutes how the parentesis work: exactly as in lisp (except for the outer most parentesis) unless infix comes into play, in which case, infix has a greater precedence over non infix (resolution between infix operators is harder to rembember, but just use parentesis if in doubt). And that's pretty much it. In fact I have to admit, being a lisper, I'm more confortable writing some operations in infix. there is a difference between "not . even" and "(compose #'not '#even)", so much that people write a "negate" function.


Name: Anonymous 2007-07-25 0:00 ID:V/j9R37L

Name: Anonymous 2009-01-14 14:55

NO EXCEPTIONS

Name: Anonymous 2009-03-06 5:53


The source would you   possibly choose C   as a language   that has great   support for threading.

Don't change these.
Name: Email:
Entire Thread Thread List