>>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?
>>41
f g x = (f g x)
f (g x) = (f (g x))
but yeah, still stupid.
Name:
Anonymous2007-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:
Anonymous2007-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:
Anonymous2007-07-24 11:50 ID:vAmBXIRJ
>>44
So you're ignoring my example about indentation, right?
Name:
Anonymous2007-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:
Anonymous2007-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:
Anonymous2007-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:
Anonymous2007-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.
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:
Anonymous2007-07-24 20:26 ID:c8V6JOdd
>>51
LOL WHAT IS OPERATOR PRECEDENCE (* (+ 1 3 3 5) 2 4 5 (/ 22 4))
Name:
Anonymous2007-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:
Anonymous2007-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.