Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Chris Campbell <cyberdanx@gmail.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] (Mostly) Functional Design?
Date: Tue, 19 Jul 2005 01:48:25 +0100	[thread overview]
Message-ID: <c22844d105071817487216eb4f@mail.gmail.com> (raw)
In-Reply-To: <42DB6161.4030507@cs.utah.edu>

On 18/07/05, Robert Morelli <morelli@cs.utah.edu> wrote:
> I've been lurking on this list for several years.  This seems as good a
> time as any to delurk and jump on a soap box.
> 
> I think you've put your finger on one of the main reasons functional
> languages have failed to attract significant use beyond a few niche
> areas.
> 
> I contend:
>    1.  The FP community tends to emphasize low level issues rather than
> the larger scale issues that concern most programmers.  It is also
> inept at practical documentation and advocacy.

Problems with documentation plague software as a whole whether they're
written in "OO" languages or "FP" languages.  Tools like Javadoc did
change things slightly.  They made it easier to put some documentation
in at low cost.  It still only works if programmers can be bothered
and don't necessarily do anything for the quality of documentation
(people will always write crap comments in code, now they just get
javadoc'd).

As for advocacy I agree that sometimes it is counter productive but
sometimes people make the mistake of assuming the purpose of the
language is to become popular and widely used in the mainstream. i.e.
it's the next Java/C# or is the silver bullet to end all software
ills.  It's not.  The reality is more complex.

Many "functional" languages are research vehicles.  They're not about
converting the masses, they're about exploring ideas.  Sometimes the
goal is not to create a language for widespread use, it is to create a
language which explores a problem or satisfies curiosity.  Some are
intended to change the world and some of those do fail.

Also note that on the whole, any language other than C, C++, Java, C#
face advocacy problems in someway.  The comment about gains in
productivity is correct, but is so not because it may not be true for
a particular language but because everyone claims it without proof. 
That's the problem with language advocacy, it's subjective not
objective.

It's probably worth noting that languages that succeed in some way do
so in a niche or fill a particular need and spread out into the wider
world, being used for problems they solve well and those they do not. 
Sometimes that helps people develop better languages, sometimes it has
a negative affect.

>    2.  There isn't much of a theory of large scale functional design.
> At least,  there is no consensus.

There is no consensus in mainstream industry either.  We have
guidelines in the form of patterns, and good rules of thumb for aiding
maintainance (low coupling, high cohesion, ...) and newer (or old ones
becoming popular) ideas that look like they make good tools to use
when appropriate ("test first", "let it fail").  None are appropriate
for all situations and their is no consensus as to what those
situations are.

>    3.  Point 2. is not the consequence of point 1.;  it's not simply a
> matter of communication,  but an instrinsic void in the FP paradigm.
> The FP paradigm is intrinsically poorly adapted to the kind of large
> scale design concepts that concern most programmers.  

Which are what?  I don't think there's any consensus on that.

> Object oriented
> programming is a much better match,  not because of a conspiracy of
> commercial giants in the software tool business,  but because of
> intrinsic technical reasons.  Functional programming is a niche
> technology ideally suited to simple domains like language tools and
> formal methods.  It does not have much to say about complicated
> systems.

First you have to define what a functional language is to talk about
that.  Let's say for the sake of argument it's charaterised mainly by
declarative variables, with emphasis on higher order functions and
structuring code through repeated function application with state
present in some way but not the default.  This isn't everyones
definition, but it's what I tend to think of FP being about.  Note
that takes in a lot of systems, doesn't say anything about
"typed-ness" and can be applied to many languages outside the FP
mainstream.  That's intentional.  I don't think there is one set of
baskets to classify all systems, and it's pointless doing so.  It's
better to realise there is a scale involved and some languages are
high up in some parts and low in others.

There are complex systems where those lend a hand in major ways.  The
absense of a stateful default is a major boost in developing
distributed systems.  It allows you to isolate state to where it is
really necessary and to not worry about consistency all the time. 
State becomes a major pain fast in such systems when it's the default.
 The rules become much more complex.

HOFs enable reuse.

> The use of type checking is a point where the FP community
> has not reached consensus,  as there are widely divergent views from
> the Scheme community and the ML and Haskell communities.  

The static vs dynamic debate is a really annoying pointless way to
increase enthropy, so I won't go there.  I will say however that
statically typed systems like ML prevent me from doing some things I
can do easily in dynamically typed systems unless they're sufficiently
rich (like say specifying functions which operate on a family of
records containing a given set of fields is trivial in dynamically
typed languages but requires something more in statically typed
systems) but come with other benefits.  I use both.

Besides, I'm pretty sure there are "dynamically typed" OO languages. 
So there are differences in the OO camp too.

> Even between
> ML and Haskell,  there are significant differences in the treatment of
> imperative features,  type inference,  objects and type classes,  etc.

This is bad?  Each shows a different choice and the consequences of
making that choice.  Each opens up different avenues of research which
leads to a greater understanding of languages and their concepts as a
whole.  Each has different trade offs.

You can limit your search to one path, but if you do that you may
never realise your on the wrong one or understand the consequences of
the choices you made.

> These differences,  it seems to me,  are more fundamental than anything
> you find in the OO world,  even the difference between,  say,  Java
> and Smalltalk.

Even if this is true, why is it a bad thing?  Sometimes there can be
more than one solution with different trade offs.  Choice isn't a bad
thing.


Chris


  parent reply	other threads:[~2005-07-19  0:48 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-14 18:00 Kyle Consalus
2005-07-18  7:59 ` [Caml-list] " Robert Morelli
2005-07-18  9:22   ` Alex Baretta
     [not found]     ` <42DB78D3.7010401@andrej.com>
2005-07-18 10:01       ` Alex Baretta
2005-07-18 18:15     ` Robert Morelli
2005-07-18 18:45       ` Alex Baretta
2005-07-18 18:56       ` padiolea
2005-07-18 19:19         ` Jon Harrop
2005-07-18 19:38       ` Jon Harrop
2005-07-18 21:27       ` skaller
2005-07-18 21:55         ` Alwyn Goodloe
2005-07-18 22:16         ` Paul Snively
2005-07-19  0:45           ` Jonathan Bryant
2005-07-18 21:37       ` skaller
2005-07-18 22:00     ` Kenneth Oksanen
2005-07-18  9:29   ` Mark Meyers
2005-07-18  9:56   ` Large scale and FP (was: Re: [Caml-list] (Mostly) Functional Design?) David MENTRE
2005-07-18 18:11     ` Large scale and FP Robert Morelli
2005-07-18 14:08   ` [Caml-list] (Mostly) Functional Design? james woodyatt
2005-07-18 16:37     ` Alwyn Goodloe
2005-07-18 14:21   ` alphablock
2005-07-18 15:26     ` Alex Baretta
2005-07-18 15:38       ` alphablock
2005-07-18 17:17       ` Doug Kirk
2005-07-18 18:14         ` Alex Baretta
2005-07-19  7:42         ` james woodyatt
2005-07-19  9:35           ` Robert Morelli
2005-07-19 16:53             ` james woodyatt
2005-07-19 17:13               ` Paul Snively
2005-07-19 23:58                 ` Jon Harrop
2005-07-20  0:29                   ` Paul Snively
2005-07-18 18:23   ` padiolea
2005-07-18 19:45   ` Gerd Stolpmann
2005-07-18 22:16     ` skaller
2005-07-19  0:48   ` Chris Campbell [this message]
2005-07-19 20:14   ` Some Clarifications Robert Morelli
2005-07-20  6:18     ` [Caml-list] " Ville-Pertti Keinonen
2005-07-24  0:04       ` Robert Morelli
2005-07-24  2:30         ` Paul Snively
2005-07-24  7:37           ` Alex Baretta
2005-07-24  8:08           ` Robert Morelli
2005-07-24 12:23             ` David Teller
2005-07-24 18:29             ` skaller
2005-07-24 18:51             ` Paul Snively
2005-07-24 12:42         ` Gerd Stolpmann
2005-07-25  7:23         ` Ville-Pertti Keinonen
2005-07-20  7:34     ` David MENTRE
2005-07-27 15:37       ` Robert Morelli
2005-07-27 20:33         ` skaller
2005-07-27 23:48           ` Paul Snively
2005-07-20 16:28     ` Damien Doligez
2005-07-24 14:51       ` Robert Morelli
2005-07-24 16:11         ` David MENTRE
2005-07-25 12:21         ` Damien Doligez
2005-07-25 15:47           ` Richard Jones
2005-07-22  5:18   ` [Caml-list] (Mostly) Functional Design? Marius Nita

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c22844d105071817487216eb4f@mail.gmail.com \
    --to=cyberdanx@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox