Does functional programming work?

Michael Rynn michaelrynn at optusnet.com.au
Mon Jan 4 02:43:45 PST 2010


On Mon, 04 Jan 2010 04:10:28 +0000, retard wrote:

> Sat, 02 Jan 2010 12:23:36 -0800, Walter Bright wrote:
> 
>> yigal chripun wrote:
>>> Have you ever actually used Smalltalk?? I have used it and it's the
>>> easiest language to use by far, having conditionals as methods of
>>> Boolean is much better, easier to read and more flexiable.
>>> 
>>> The beauty of smalltalk is that you can easily add new "language"
>>> features in the library with little effort and they do not look
>>> foreign to the language. in fact, almost all of smalltalk is
>>> implemented in the library and it only has 5 actual keywords.
>> 
>> 
>> What's your opinion, then, about why Smalltalk has failed to catch on?
> 
> The same question could be asked just about any language. If you have
> followed the internet discussion & hype around JVM/.NET languages -
> these are all very young languages and share many aspects. Languages
> like Clojure seem to be doing well.. Why? Charismatic leaders, perhaps?
> "Clojure: Lisp done right" - I don't believe that, but many do. People
> are sheeple. They believe that languages are religions. Marketing
> matters. Technical superiority rarely has much effect.


I had a quick look to see what Clojure was about, and watched the video 
on the link on the http://clojure.org site. (Video of a talk from QCon on 
State and Identity).

Clojure is designed as better ways to mix imperative and functional parts 
of programs easily "on a local system".  No more messing directly with 
locks, which can have problems. ( which "only experts can get right 
initially, and then its hard to maintain"). 

With multi-processor cores, easily doing parallel programming is becoming 
the future.  We cannot expect as programmers to "stop the world" as in 
iterative-only programming. 


Well it was a good sales talk. 

I found the complicated ways of using indirection to support different 
versions of object instances using shared tree node membership, 
interesting, and the statement that we had better get used to the idea 
that the version being accessed may already be outdated, and the use of 
time relative checks, compare and Set, immutable data, software 
transactional memory (STM).  And Lisp syntax.  But no classic OO 
inheritance. 

A lot of things needed to support concurrency, and Richard Hickey says 
you have to do all of clojures tricks to make it all work. The builtin 
collection facilities are designed with the STM support. Its for JVM or 
CLR.


Most programs, with the exeception of multi-user databases and servers,
massive climate and weather models, maybe a few concurrent threads at 
most.  

Of course we can still get by with fiddling synchronized object locks, 
notify and wait. Its nice if the language has support built in.


I look forward to seeing results of more evolution of D to support 
concurrency, and what will need to change.  









More information about the Digitalmars-d mailing list