Friday, November 24. 2006Functional languages will ruleTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Agreed on most points. I'd like to hear opinions on this: Part of the appeal of of imperative and Object-Oriented languages is they offer a physical metaphor mapping to how we think about the world. The world is made of "things", and we can take action on those "things", or list actions that need to be taken. Our minds are wired to work with physical objects, and a physical metaphor allows us to use that wiring.
You point out the shortcomings of this model in a programming environment, which I agree with. Ideally we could find a way to gain the advantages of functional programming while keeping an easy-to-understand metaphor, but it seems we need a better solution. I wish I had one. Anyone have thoughts in this area?
in response to Ryan Brush in the first comment above who said:
I'd like to hear opinions on this: Part of the appeal of of imperative and Object-Oriented languages is they offer a physical metaphor mapping to how we think about the world. The world is made of "things", and we can take action on those "things", or list actions that need to be taken. Our minds are wired to work with physical objects, and a physical metaphor allows us to use that wiring. Object oriented programming is a misnomer. Objects in object oriented programming are not at all tied to objects in the real world (thank goodness). You can have objects for processes -- things which are not objects in the real world. Alan Kay has apologised for coining the word "object"; he feels it was a great mistake. He talks about the Japanese word ma -- the space and interaction between. In fact it seems the most powerful aspect isn't modeling static objects in the world but modeling processes in the world -- with things in the programming world called objects? Not a good word.
The link to the Haskell-debunking article is broken. Could you summarise it or find a non-broken link?
Fixed. http://wagerlabs.com/2006/1/1/haskell-vs-erlang-reloaded
Link is broken again. Do you mean this article?
http://www.wagerlabs.com/blog/2005/12/haskell-vs-erla.html
Given what you didn't like about OCaml, F# might be a good choice -- it is basically OCaml with .NET library and operator overloading (it also lacks some OCaml features, such as functors).
The Haskell-Erlang article has an area where Erlang shines and Haskell standard library does very badly: binary IO. In addition, trying to statically type message-passing concurrency with a lot of message types leads to a combinatorial explosion. So, if you are programming something which does not need binary IO, try out Haskell, it may be worth it. Another good language is Nemerle. It is very similar to Scala, except for CLR rather than JVM.
Just another Java programmer looking for the next buzzword. His attachment to FP is purely incidental, since he knows nothing about it.
Okay, my first sense was to simply delete this post. My blog is a place for constructive feedback. But, I think this might be the place to respond.
First, it would have been nice for Slava to post a URL or email address so that I could have continued the dialog, but he did not. I did a search, and the best case is that Slava is this person: http://en.wikipedia.org/wiki/Slava_Pestov So, he's written a functional language. That's pretty cool. I would have hoped that he would have remembered when he was learning about functional languages and perhaps corrected me where I was wrong and maybe helped with this discussion. In terms of my background with functional languages, it's non-linear. I've written two, but have no formal knowledge or training in academic functional languages. I am learning about functional languages, but based on my exposure to date, I am making a prediction. It may or may not be right, but nothing I have seen has shown me that my prediction is wrong. The two functional languages that I have written are Mesa and Integer. Both are spreadsheets. Spreadsheets are the most popular programming systems in the world. The advances I've made to spreadsheets are: - Formula inheritance. Mesa is the only spreadsheet to support spreadsheet meta-programing by supporting higher order functions. - Real time spreadsheets. Mesa was the first spreadsheet in the world to allow real time data to flow into the spreadsheet, update the spreadsheet, and trigger external events. - Formula function plug-ins. Mesa was one of the first spreadsheets to support addition of formula function libraries. - Formatting side effects. Mesa was the first spreadsheet to support formulaicly changing the formatting of a cell based on the cell contents. Useful for highlighting a cell. Also, a bounded side-effect of a calcualtion. With Integer, I added new features to spreadsheets beyond what was in Mesa: - Multithreaded recalculation. Integer is the only commercial spreadsheet to break the calculation task down such that it can be farmed out across threads. The algorithm for doing this is O(n log n). - Objects in cells. Integer supports placing arbitrary objects in cells (and in formula functions) such that an add-in can define arbitrary types (e.g., a currency object), the parser for those types, and formulas and operators that operate on those types (polymorphism). So, maybe I'm a recovering Java guy looking for something that addresses the deficiencies in Java. Maybe I'm a guy who is learning something new and sharing my experiences with other folks. But, if you disagree with me, tell me why. If I've said something wrong, educate me. If you think my blog is not helpful to you, don't read it anymore.
Thanks for the info. I'm going to include Haskell in my learning.
Another functional option is newLisp, a modern rewrite (in C) of the old classic. You can easily call newLisp scripts from within CF.
Check out the F# language. I've written some demos in it recently:
http://www.ffconsultancy.com/dotnet/fsharp/ Cheers, Jon.
Wicked cool stuff. Not having a Windows machine that I actively use, I don't have much of an opportunity to try F#, but reading your code put a smile on my face. Thanks for sharing!
Ah, if you're into Linux or OSX then you'll be wanting to look at our OCaml demos instead:
http://www.ffconsultancy.com/ocaml/ We have lots of OCaml and F# related products, of course, but there is loads of free stuff on our site. Check out the free introductory articles for the Journals, for example. All the best! Jon. |
David PollakCalendar
QuicksearchCategoriesBlog Administration |
||||||||||||||||||||||||||||||||||||||||||