caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: Robert Morelli <morelli@cs.utah.edu>
Cc: Kyle Consalus <consalus@gmail.com>, caml-list@yquem.inria.fr
Subject: Re: [Caml-list] (Mostly) Functional Design?
Date: Mon, 18 Jul 2005 21:45:59 +0200	[thread overview]
Message-ID: <1121715959.21919.59.camel@localhost.localdomain> (raw)
In-Reply-To: <42DB6161.4030507@cs.utah.edu>

Am Montag, den 18.07.2005, 01:59 -0600 schrieb Robert Morelli:
> 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.

Well, I don't believe that. There aren't any technical reasons why
people don't think FP languages are attractive. There are social
reasons. Adult programmers and decision-makers must sit down again on
the school bank. It has to do with the difficulty to get into existing
and working relationships. IMHO, a marketing expert can say much more
about this than a techie.

> 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.

This is entirely nonsense. Although current FP languages have certain
typical "low level" mechanisms like functional composition, they also
have lots of other higher level mechanisms (e.g. a module calculus). 
A current FP language may also be an imperative language or an OO
language at the same time. At least O'Caml is a true multi-paradigm
language.

Another remark: Designers of FP languages often try to avoid the inner
contradictions of the widespread practical languages, and to only
include "sound" language concepts. Sound concepts work for small-scale
and for large-scale programs. For example, if you compose two functions
f and g to a new function, it does not matter how large f and g are. If
f and g are stateless, you don't run into the typical problems of
large-scale imperative programming, i.e. managing the state in a
reasonable way. Well, of course, the term "sound" should be seen
relative to the intentions of the language designer.

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

Your thesis also includes that other languages have some theory of
large-scale programming. I doubt that. Design patterns, for example, are
medium-scale at best. They help organising the relationships of only a
few classes. Even worse, if you translate design patterns to FP
languages, you often get small-scale counterparts. And is there anything
beyond design patterns?

I also miss that "large-scale" is a multi-dimensional term. It is very
different to design reusable data structures or to design a single large
program. Current FP languages are quite good at supporting reusability. 

>    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.  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.  

My view is very different. OO languages like Java or Eiffel are extreme
languages in the sense that they only allow OO to structure the program
and nothing else. (And in the past many OO programmers were really
extremists because they thought the OO paradigm reflected how the world
was structured.) At least O'Caml isn't designed with extremism in mind,
and you _can_ program in it as it were an OO language. This easily
proves that there aren't such technical reasons: O'Caml is a superset of
OO languages.

> 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.

This only has to do with marketing. It is much simpler to be successful
in a niche where other technologies have clear disadvantages than to be
successful in a universal sense.

I hope the programmers of the world will learn, and will see that much
of the complexity OO pretends to solve has been created by the extreme
view of OO before. For example, compare how GUIs are customised in an
extreme OO language and a multi-paradigm language like O'Caml. In the
extreme language you often must use quite heavy constructs like
subclassing to get a new behaviour where you can simply pass a closure
in O'Caml.

One clear disadvantage in the large scale _application_ of FP languages
is that the programmers must learn much more primitive concepts, and it
takes longer until they can combine them in a reasonable way to large
programs.

Gerd

> Kyle Consalus wrote:
> > There are a wealth of resources related to object oriented design techniques
> > (which can certainly be applied to OCaml), but I've been pretty much unable
> > to find any good resources on large scale design of functional programs.
> > I realize that this is the sort of thing that develops over time with
> > experience.
> > Just the same, there is (most likely) a lot to learn and consider, and a 
> > resource would be helpful. My recent uses of OCaml for fairly small projects
> > have been effective, but a lot of things were cumbersome in the design
> > and I suspect that I may be thinking about it wrong.
> > So, could anyone suggest a good resource or perhaps weigh
> > in on their thoughts on the topic?
> > 
> > Thanks,
> > 
> > Kyle
> 
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
> 
-- 
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany 
gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
Telefon: 06151/153855                  Telefax: 06151/997714
------------------------------------------------------------


  parent reply	other threads:[~2005-07-18 19:46 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 [this message]
2005-07-18 22:16     ` skaller
2005-07-19  0:48   ` Chris Campbell
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=1121715959.21919.59.camel@localhost.localdomain \
    --to=info@gerd-stolpmann.de \
    --cc=caml-list@yquem.inria.fr \
    --cc=consalus@gmail.com \
    --cc=morelli@cs.utah.edu \
    /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;
as well as URLs for NNTP newsgroup(s).