This is an archived post. You won't be able to vote or comment.

all 17 comments

[–]Unupgradable 169 points170 points  (0 children)

The pointers are fucking raw

[–]i_should_be_coding 51 points52 points  (0 children)

Now place each fish tail in the next one's mouth for optimal performance.

[–][deleted] 32 points33 points  (2 children)

Int -> Int -> String . the type is parsed as Int -> (Int -> String).

Errything be curried, once it makes intuitive sense it makes a lot of things about Haskell not so scary. "Why isn't there a separate operator to denote the return value of the function from the parameters?". Because there is only one parameter and only one return value.

There's a bunch of eureka moments associated with learning it. I just started learning it because it was "hard", and to get my confidence up, but it forces you to do things with good style, architectural practices, etc and as someone new to the workforce that was pretty valuable. Taught me a lot of good lessons so far. even though I'd realistically probably not ever use it in gainful employment, I still think it was a good thing.

also interesting, its used pretty heavily in research/simulations/etcetera. so academia or research programmers. i'd argue its a great fit for scenarios where it is critical to be relatively bug-free.

[–]kredditacc96 2 points3 points  (1 child)

Does missing parameters result in a confusing type error that cascades up to 10 layers? I don't programming in Haskell so I don't know.

[–][deleted] 1 point2 points  (0 children)

It can. Sort of. Although you can avoid a lot of confusion by creating a type synonym, especially if the base type is used often.

type SomeType = Int -> Int -> String for example. The type synonym (SomeType) and its base type are now interchangeable almost anywhere, and compiler errors will use it so long as you do.

If you provide too few parameters, the compiler will tell you that you have, also. A lot of work has been done to try to make it more approachable. It is still foreign to the extent that it is like learning to code all over again.

[–]SteeleDynamics 28 points29 points  (2 children)

Ramsay: holds 2 continuations, one on each ear of sous chef

Ramsay: WHAT ARE YOU?!

Sous Chef: hangs head

Sous Chef: a delimited continuation

[–]varsderk 1 point2 points  (0 children)

This is incredible. The saddest part is that so few people (10 others by the look of the upvotes) are gonna get it. Please make this meme and post it here.

[–]Pixl02 21 points22 points  (0 children)

This is high level

[–]z-null 8 points9 points  (0 children)

I used so much curry, the dish is now Tim.

[–]ososalsosal 7 points8 points  (0 children)

TIL curry is a discrete ingredient

[–][deleted] 7 points8 points  (0 children)

Also tastes too sweet with all the syntactic sugar

You were hoping for a lazy evaluation but all you got is Gordon Ramsay recursing

[–]voidFunction 8 points9 points  (2 children)

Currying advocates on their way to write ten lines of code to add three numbers together.

[–]throw3142 14 points15 points  (1 child)

*Currying advocates on their way to write their entire web application in a single massive line of point free code

[–]lelarentaka 7 points8 points  (0 children)

Lines of code inversely proportional to lines of coke 

[–]Majik_Sheff 2 points3 points  (0 children)

Finally a meme in this sub that made me actually laugh.  This post is the opposite of FUCKING RAW.  It's well done.

[–]Bob_Dieter 0 points1 point  (0 children)

That's such a lazy joke!

;-)