Hey, C Is a Functional Language Too
spin.atomicobject.com
Hey, C Is a Functional Language Too
1–10 of 78 posts
Re: Hey, C Is a Functional Language Too
#2Re: Hey, C Is a Functional Language Too
#3No it's not. What makes a language functional is its ability to eliminate tail recursion.
I don't think the author is seriously of the belief that C is a functional language. This is just a fun little example of writing C in a functional style.
Re: Hey, C Is a Functional Language Too
#4Re: Hey, C Is a Functional Language Too
#5No it's not. What makes a language functional is its ability to eliminate tail recursion.
Re: Hey, C Is a Functional Language Too
#6Denying yourself the use of the heap is also going to make closures rather difficult. You can use this style to pass back a function pointer, but the caller would also need to allocate space for the callee's captured variables. Ick.
Re: Hey, C Is a Functional Language Too
#7No it's not. What makes a language functional is its ability to eliminate tail recursion.
That's not a very good definition. It means that GHC-flavoured Haskell isn't functional: http://www.haskell.org/haskellwiki/Tail_recursion
Re: Hey, C Is a Functional Language Too
#81: http://en.wikipedia.org/wiki/Chicken_Scheme
2: http://wiki.call-cc.org/chicken-compilation-process
3: The homepage is called www.call-cc.org :P
Re: Hey, C Is a Functional Language Too
#9No it's not. What makes a language functional is its ability to eliminate tail recursion.
Having first-class function values in the first place strikes me as way more important. Purity helps, too.