Is it just me, or is Haskell the most confusing language to learn? I mean, C/C++, Java, Python, heck even Ruby are relatively easy compared to this cludgey shit. BTW, Monads are a retarded concept. Simon Peytell Jones (the creator of Haskell) was right when he said that Haskell is fucking useless (I'm paraphrasing, but that's the basic jist of it)
Name:
Anonymous2007-09-08 6:40 ID:8As4YO11
I was going to learn it once but then I was like, "Fuck, this is a lot of syntax... this is *really* a lot of syntax. Back to Lisp." It's not an across the board functional language thing either. Ocaml seems simple enough, and Erlang, while ugly as hell, seems fairly simple. Dunno why Haskell is so complicated.
Name:
Anonymous2007-09-08 6:44 ID:ErvAZqt7
It's not that complicated.
Name:
Anonymous2007-09-08 7:38 ID:yNhL+Hyt
>>3
You must have been an APL programmer back in the day.
Name:
Anonymous2007-09-08 7:58 ID:cF7dC9iS
Fuck, this is a lot of syntax... this is *really* a lot of syntax. Back to Lisp.
lol fucking failure, since when are lisp hackers idiots?
Name:
Anonymous2007-09-08 8:32 ID:21WGiu3s
Haskell is just different from imperative programming. It's best to let go of the idea of controlling order of execution. And you can't play an imperative programmer in a monad, like you can with reference types in ocaml.
Name:
Anonymous2007-09-08 10:27 ID:HCuPPGUk
try factor then
Name:
Anonymous2007-09-08 11:09 ID:4vzd0WxX
>>1 Is it just me, or is Haskell the most confusing language to learn?
Yes, it's just you. I didn't have any problems learning Haskell in a few weeks by doing a real project in it. You're probably just too deeply stuck in your imperative mindset.
haskell is far too easy actually which is why I use lisp
I enjoy having to write fun little list munching algorithms and make my own pretty data structures..
when you hack haskell everything is there for you and before you know it your programs done.. I always get that ok now what feeling after finishing haskell projects.
anyways haskell is easy, just dont try it if you havent read SICP!
void * mFunctor(void * m, arr f){
if(CAST(maybe,m)->nothing){
return (void *) m;
} else {
CAST(maybe, m)->current = f(GEN(maybe,m));
return m;
}
}
functor * maybeFunctor (maybe * object){
functor * maybe = malloc(sizeof(functor));
maybe->object = object;
maybe->arrow = &mFunctor;
return maybe;
}
/* I actually need an garbage collector. This will be so much nicer */
int main(int argc, char *argv[]) {
int x = 1;
maybe * y = just(&x);
/* this is not needed but it gives an haskelly feel to the code */
functor * f = maybeFunctor(y);
void * _in(void *x){
int * y = CAST(int, x);
(*y)++;
return y;
};
functor * g = map(f, _in);
printf("%d", *VALUE(maybe, int, FORGET(g)));
return 0;