what is a 'functional' programming language?
A disfunctional one would be a bit of a waste of time, wouldn't it?
( ,
Wed 22 Jan 2003, 20:53,
archived)
A funtional programming language
is a language in which all expressions are defined in terms of functions - there are no mutable variables, so you can't store values.
Example haskell prog:
take1 _ [] = []
take1 0 _ = []
take1 n (x:xs) = x : take1 (n-1) xs
See how it looks like maths?
Thats why we CSists call it "Lame."
( ,
Wed 22 Jan 2003, 21:06,
archived)
Example haskell prog:
take1 _ [] = []
take1 0 _ = []
take1 n (x:xs) = x : take1 (n-1) xs
See how it looks like maths?
Thats why we CSists call it "Lame."
how bizarre.
I don't really understand the example code at all, and I can't really see how you can do much without mutable variables. But I'm not a CS person.
Thanks for the explanation.
I am now considering developing a dysfunctional programming language though. Instead of a "Hello World" test program, you'd use a "I always hated you, mother, you fucking bitch. Fuck Off you cunt!" program...
( ,
Wed 22 Jan 2003, 21:11,
archived)
Thanks for the explanation.
I am now considering developing a dysfunctional programming language though. Instead of a "Hello World" test program, you'd use a "I always hated you, mother, you fucking bitch. Fuck Off you cunt!" program...