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

Proof that Haskell sucks!

Name: Anonymous 2012-02-18 5:44

Check out the Rosetta Code page on Y Combinator.  In many languages that you would not even expect, this functional combinator is simple and straighforward.

For instance, Algol 68!

Haskell? "The obvious definition of the Y combinator in Haskell canot be used because it contains an infinite recursive type (a = a -> b). Defining a data type (Mu) allows this recursion to be broken. "

What kind of a shit functional language doesn't let you define the Y combinator using the obvious definition?

Oh right, the same one in which contortions are required to put items of different types into the same linked list.

Name: Anonymous 2012-02-18 8:36

i only know a little about haskell... what contortions are needed to make a heterogeneous linked list? some kind of pointer/reference type?

Name: Anonymous 2012-02-18 9:08

``faggot''

newtype Mu a = Roll { unroll :: Mu a -> a }
 
fix :: (a -> a) -> a
fix = \f -> (\x -> f (unroll x x)) $ Roll (\x -> f (unroll x x))
 
fac :: Integer -> Integer
fac = fix $ \f n -> if (n <= 0) then 1 else n * f (n-1)
 
fibs :: [Integer]
fibs = fix $ \fbs -> 0 : 1 : fix zipP fbs (tail fbs)
  where zipP f (x:xs) (y:ys) = x+y : f xs ys
 
main = do
  print $ map fac [1 .. 20]
  print $ take 20 fibs

Name: Anonymous 2012-02-18 9:14

>>1
ugh. typed-lambda calculus was made with the intention of not admiting thing that can exploit the russel paradox (ie Y combinator) that why it's said the typed lambda calculus is less powerful that untyped one but safer.

tl;dr not haskell fault, it was with that purpose made the typed  lamda calculus

Name: Anonymous 2012-02-18 9:45

>>4
So the reason Haskell was created is to make a shittier language than what we already have?
I say, they did a pretty good job!

Name: Anonymous 2012-02-18 11:31

>>5
It was created to make shitcunts like you unemployable.  Guess they didn't predict the rise of the toilet scrubbing profession though.

Name: Anonymous 2012-02-18 12:01

>>6
Yeah because Haskell is definitely one of the most used languages in the industry.

Name: Anonymous 2012-02-18 12:36

What's the different between the Y combinator and this??

`fix f = f (fix f)`

Name: Anonymous 2012-02-18 13:04

>>8
The difference is that Y combinator words.

Name: Anonymous 2012-02-18 16:02

>>8
The difference is that yours is a recursive function where the function name is visible within its body while the Y combinator is a combinator.

Name: REDDIT MOMENT 2012-02-18 17:03

Why comb in a Tor?

Name: Anonymous 2012-02-18 19:21

Statically typed lambda calculus is a useless crock of shit.

Name: Anonymous 2012-02-18 23:13

>>10
What? Combinators are just functions.

Name: Anonymous 2012-02-19 0:03

this is stupid. Y combinator is just a fixed point combinator and haskell can have a fixed point combinator simply by fix f = f (fix f)

Name: Anonymous 2012-02-19 0:19

>>13,14
The whole point of a combinator is that it does not use its own name in its definition.

Name: Anonymous 2012-06-26 2:47

hguhgkjhg

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