caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: David MENTRE <david.mentre@gmail.com>
To: Robert Morelli <morelli@cs.utah.edu>
Cc: Kyle Consalus <consalus@gmail.com>, caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Some Clarifications
Date: Wed, 20 Jul 2005 09:34:44 +0200	[thread overview]
Message-ID: <3d13dcfc05072000347a6a4fba@mail.gmail.com> (raw)
In-Reply-To: <42DD5F41.8060801@cs.utah.edu>

Hello Robert,

[As a side note, you did not answered my question on which software
you consider of large scale. ]

Just two remarks on your post:

2005/7/19, Robert Morelli <morelli@cs.utah.edu>:
> One of the areas where I do much of my programming is in mathematical
> software.  I view this as one of the most difficult areas,  at the
> opposite extreme from simple domains like formal methods and language
> tools.  The problems with characterizing mathematical objects come
> up peripherally here with representations of numbers.  This always leads
> to endless,  inconclusive discussions of issues like operator
> overloading,  inheritance and multiple inheritance,  multiple dispatch,
> multiple views of a data structure,  constraints, etc., etc.

You should take a look at Axiom:
http://page.axiom-developer.org/zope/mathaction/FrontPage

This is an old Computer Algebra System, developed for 30 years at IBM
and now free software (BSD-like license). It has a complete typing of
mathematical expressions. The type system is very different from ML
systems however: no type inference. It is closer to a dynamic OO
language, but the types are not computer types but mathematical ones,
based on mathematical properties of objects (you know more about the
subject than me).

To come back to OCaml, Axiom interactive type system poses interesting
questions regarding type inference and interactive systems.
Mathematical notation is based on operator overloading: use the same
"+" as an operation on matrices or on integers, but the two "+" are
not the same operations, even if they have the same mathematical
properties. ML type systems are very bad when you need to manipulate
objects of different types (in OCaml, you would need +, +., +/, +b,
etc.). Maybe there is some interesting research to be done in that
area. Pierre Weis (of OCaml fame) discussed ones with Tim Daly (Axiom
lead developer) but did not catched the issue (at least this is how I
interpreted the discussion).


> The fundamental point is that OO puts interaction at the
> center of the paradigm,  not abstract characterization.  That has
> huge consequences and it's what makes the whole idea of a "theory"
> of large scale design meaningful.  OO commits to a certain way of
> organizing interaction,  state changes,  behavior changes, ....  that's
> attractive in practice (but requires deeper theory than FP).

I disagree on most of your arguments when comparing OO et FP (for the
same reasons as others have developed on the previous thread).
However, I agree on issues regarding  interactivity and ML typing, and
more generally on the rigid aspects of ML typing in *certain*
contexts.

As a programmer, ML typing is very rigid and this is a good point: I'm
sure that in all over my program, the datastructure is *never* misued
and that certain invariants are ensured. ML typing and moreover type
inference is a must have for library programmers.

However, as an interactive user (cf. my above comment on Axiom) or as
a system architect, I sometimes misses the flexibility of dynamic OO
system. Ok, they allow the system to be incoherent, but this is
sometimes *useful*, for example when you refactor a big system and you
want to test a subset of your modifications. The other point, as I
said, is the use of overloading. It is natural in dynamic OO systems,
it is very unpleasant in OCaml (although I haven't dug into GCaml, I
had a bad experience with OCaml objects).

I sometimes dream of a system that would allow me to have *both*
static typing and type inference like ML and dynamic typing like Lisp
or OO languages. The best of both worlds! :) In my opinion, the
interesting part is how to mix the two paradigms smoothly, e.g. how to
have meaningful error messages, how to define types for certain
objects but let the type inference system do the job for most of my
code, etc.

Yours,
d.

PS: formal methods or language tools are *not* simple domains! :-)


  parent reply	other threads:[~2005-07-20  7:34 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-14 18:00 (Mostly) Functional Design? 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
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 [this message]
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
2005-07-27  9:38 [Caml-list] Some Clarifications Don Syme
2005-07-27 10:58 ` Jon Harrop
2005-07-27 11:55   ` Robert Roessler
2005-07-27 14:01     ` Richard Jones
2005-07-28  0:29       ` Robert Roessler
2005-07-27 18:42     ` skaller
2005-07-27 13:36   ` David Thomas
2005-07-27 13:53     ` Ville-Pertti Keinonen
2005-07-27 16:23   ` james woodyatt
2005-07-27 14:32 David Thomas

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=3d13dcfc05072000347a6a4fba@mail.gmail.com \
    --to=david.mentre@gmail.com \
    --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).