Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] recomendations for a functional language



Alan Busby writes:
 > On Mon, Nov 2, 2009 at 7:01 PM, Stephen J. Turnbull <stephen@example.com>wrote:

 > Er, maybe poor choice of wording. I didn't necessarily mean broken/buggy
 > libraries, but ones that might be "less than elegant".

Those aren't synonyms?![1] ;-)  I don't know what you do in software,
but the stuff I do (academia and volunteer maintainer for a long-lived
product) puts a *very* high premium on correctness and readability.
Especially in maintaining existing software.  In software maintenance
and simply in updating my system, I've been personally screwed by bugs
in all of

 > DB drivers, SOAP/XML, Stats/Math, graphics/3D, networking, device,
 > cryptography, etc.

except SOAP/XML.  I was told just Thursday that Matlab's nonlinear
solver can't be trusted to give right answers.

 > You can accomplish far more work in less time by harnessing the
 > efforts of others.

Sure, but in my experience it matters which portion of whose work you
choose.  A lot.  Especially if you're maintaining a long-lived
product, rather than being judged on the number of features you can
implement in an afternoon.

 > The OP was curious about catching up on the latest programming
 > language developments, and although Haskell has a lot to offer,
 > there are number of other new languages [...] introducing
 > additional new material as well.

I wouldn't choose Clojure for that, though.  Beyond Lisp, Clojure has
the direct access to JVM, but that's not mind-expanding.  There's a
bunch of stuff to do with threading, but the language is ugly, and
doesn't really expose the ideas as well as, say, the STM mechanism in
Peyton-Jones's essay in *Beautiful Code*.  In the basic language,
there's some good syntax like use of a plist instead of an alist for
the binding list in let, but on the other hand there's weirdness like
random substitution of vectors for lists in various syntax, and the
loop ... recur syntax (we do know how to spell "tail recursion", don't
we?)  That's purely a JVM-induced wart, according to the Clojure
website.

Amusingly enough, the Wikibook on Clojure refers to a Python program
which is way prettier than the Clojure (the spelling correcter,
http://en.wikibooks.org/wiki/Clojure_Programming/).

 > I'd argue that learning to use macros well, offers more
 > educationally than the Hindley-Milner type system. Not that static
 > typing isn't useful, but it doesn't open up new ways of thinking
 > like the way code generation does.

I'm not sure I agree, even though I love Lisp macros.  The idea of
computing the program, then executing it is very important, but it's
most powerfully applied in languages with minimal, very regular syntax
like Lisp.  It's mostly used to define new syntax (in fact that's
precisely what it's called in Scheme: define-syntax).  OTOH, Haskell
and such languages do provide the ability to compute functions, return
them, and apply them later, though not as flexibly as Lisp.  Heck,
even Python does that.  So I think the basic notion of function as
first-class object is there, even if macros aren't.


Footnotes: 
[1]  Cf. Curt's "the program is the spec" line of thought.



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links