David Brown wrote:
Scheme/lisp are only part of the way toward functional programming
languages.  Most programs still rely heavily on mutable data.

Yep. Scheme seems to be generally used in a more functional way than Common Lisp but you are right in that you can implement any programming style with them. That is why a lot of people like them. Right tool/technique for the job.

If you really want to learn functional programming, learn Haskell.  It
really takes some mind bending, but I found it to be fun, even if not

Already learning it. I have gone through most of

I really like the idea of purely functional programming and the idea that you can theoretically prove correctness for some codes. Still trying to grok monads though.

There's nothing wrong, at all, with a global that doesn't change.  The
problems come with globals that can change value.  Things define'd will

Right. If you can somehow guarantee (by declaring it static or whatever) that it won't change. But as long as it could possibly change via a bug it's a problem.

For mutable state, it is much better to keep that in closures.

Yep. Still trying to grok closures also. I like the idea of designing smart data structure that can do things themselves as opposed to functions to manipulate data structures that are external to them.

Again, "pure" functional programming doesn't have any mutable state.

Yep. And just try explaining that it is possible to write useful software in a language that has no variable assignment to a 20 year procedural programming coder and see how far you get. :)

--
Tracy R Reed                  Read my blog at http://ultraviolet.org
Key fingerprint = D4A8 4860 535C ABF8 BA97  25A6 F4F2 1829 9615 02AD
Non-GPG signed mail gets read only if I can find it among the spam.


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to