Version française
Home     About     Download     Resources     Contact us    
Browse thread
(Mostly) Functional Design?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Gerd Stolpmann <info@g...>
Subject: Re: [Caml-list] Some Clarifications
Am Samstag, den 23.07.2005, 18:04 -0600 schrieb Robert Morelli:
> To be entirely frank,  I am put off by the style of your comments.
> If you disagree with my answer to the subject of this discussion,
> you should point the original poster to what you think is a
> discussion of large scale functional design,  or present your own
> explanation for why it doesn't exist.  I would be genuinely interested
> in what you have to say.  But instead,  you have chosen to veer off into
> rhetoric,  advocacy,  and ad hominem distractions.  I am puzzled by your
> citing points about Erlang and concurrent variants of ML that sound
> superficially to be relevant,  but which have no real bearing on
> anything I said.  I disagree with the frequent use of this mailing list
> to irrationally promote OCaml as a superior language to Java.  It is not
> an advocacy forum,  and I will not be drawn into criticizing OCaml's
> object system in this context.  When I crave irrational discussions,  I
> visit slashdot.  I am disappointed that you have resorted to ad
> hominem distractions,  projecting knowledge or "feelings" on me of
> issues outside of,  and irrelevant to,  what I stated,  and which do not
> represent my own feelings or anything I wish to discuss here.

I really doubt you know what you are speaking about (or, in other words,
we have a very different perception). First, I don't see that there is
very much advocacy on this list. Sometimes there are threads where
language features are compared, and it is very clear that a language
with many features like OCaml wins over a language with intentionally
few features like Java. There is almost always a more concise expression
for the same in OCaml. But this isn't advocacy, it is just an
observation. It doesn't mean that OCaml is the better language in
general.

Second, about "large-scale". I really wonder what your point is. OCaml
has a number of features that are a good basis for large programs.
Obviously, this list ignores all these features in its advocacy. Just to
bring them to your knowledge:

- OCaml has a quite strong definition, in the sense every expression
  has a clear meaning. This is very important for large programs,
  because it reduces unwanted effects.

- OCaml is statically typed, and its type system is much richer than
  the systems of pure OO languages. It is common practise to model the
  base lines of large programs by first designing the types one wants
  to use.

- Types may be polymorphic, to support reuse of code.

- OCaml has a module system. It is easy to implement a "separations
  of concerns" strategy by modularising the program.

- OCaml allows opaque types. This supports the "information hiding"
  which is also a large-scale strategy. There are also design techniques
  like abstract data types.

- The modules have a signature. It is possible to design the module
  system in advance (i.e. before implementation) by specifying the
  signature.

- OCaml allows separate compilation.

Note that all these large-scale features aren't special to functional
programming (but are compatible with it). In this sense, your original
thesis is correct. It is just the case that the conventional strategies
of large-scale design can also be applied to functional programs. Maybe
this is the reason why you don't find a thread about it.

As you mention Java: Of course, there are lot of books about large-scale
programming, because it is unclear from the language definition how to
do it. There is only a quite overloaded class system (which is also a
module system and also a type system), and it is the question how to use
the class system to get the effects of strategies like "separations of
concerns". (Note that the "design patterns" have little to do with this,
they are "low-level".)

I hope this message answers at least the question of the original poster
and gives some hints where to look.

Gerd

> In case you,  or anyone else,  is genuinely confused by what I said,
> I will make a further clarification in a separate post.
> 
> _______________________________________________
> 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
------------------------------------------------------------