caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Serge Aleynikov <serge@hq.idt.net>
To: skaller <skaller@users.sourceforge.net>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Scripting in ocaml
Date: Thu, 21 Dec 2006 09:59:15 -0500	[thread overview]
Message-ID: <458AA143.3090303@hq.idt.net> (raw)
In-Reply-To: <1166709162.5653.11.camel@rosella.wigram>

skaller wrote:
> On Thu, 2006-12-21 at 08:30 -0500, Serge Aleynikov wrote:
>> skaller wrote:
> 
>>> As one of the authors of several major pieces of Python,
>>> my comment is that whilst it provides great convenience
>>> and good code structure .. dynamic typing just doesn't
>>> scale.
>> Could you please illustrate your point by more concrete reasoning. 
> 
> It isn't a matter of reasoning but experience. Many people believe
> static typing is good because it improves the likelihood a program
> is correct, perhaps by making it easier for both the human and
> machine to reason about the code -- and in particular catch
> errors which would otherwise require testing, and even then
> the actual location of a bug might be hard to determine.

OCaml has static typing but doesn't provide an actual location of code 
in exceptions.  Is it because it was hard or intentional?

> I guess the arguments for static typing and scalability are
> well known. So the reasoning part is clear: we infer larger 
> programs without dynamic typing are harder to get right.

I agree with your statements applicable to imperative/OO dynamicly typed 
languages.  However if a dynamic language is functional, this makes it 
possible to provide run-time static analysis to identify type related 
bugs and unreachable code.  An example of this is the Dyalizer tool for 
Erlang.

In this case running such a tool after compilation reveals the same 
problems that a compile-level static checker would do, but allows for 
run-time code reloading, more safe term serialization/deserialization, 
and safer cross-language integration.  Needless to say, this benefits 
comes at price of efficiency, but there are many cases when these 
features out-weight a reasonable performance loss that can be regained 
by parallelizing computations.

> Sorry, I wasn't clear. I meant to refer to dynamic loading in Ocaml,
> not in general. Exactly why that is I don't know. Perhaps the
> interaction of the static typing and dynamic loading is not
> easy because it is not well understood how to make it so,
> in Ocaml, and perhaps in general (without losing type safety)

I believe that introducing strict typing in the language might help in 
bridging static typing and dynamic loading.  Strict typing would allow 
to do run-time type verification and type-specific guard checks. 
Though, this would no longer be Ocaml as we know it today.  ;-)

Serge


  reply	other threads:[~2006-12-21 14:56 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-21  3:41 Denis Bueno
2006-12-21  4:34 ` [Caml-list] " Erik de Castro Lopo
2006-12-21  7:22   ` skaller
2006-12-21  9:12     ` Till Varoquaux
2006-12-21  9:18     ` Chad Perrin
2006-12-21 10:29       ` skaller
2006-12-21 20:21         ` Chad Perrin
2006-12-21 13:30     ` Serge Aleynikov
2006-12-21 13:52       ` skaller
2006-12-21 14:59         ` Serge Aleynikov [this message]
2006-12-21 20:25           ` Chad Perrin
2006-12-21 20:41             ` Daniel Bünzli
2006-12-21 22:16               ` Chad Perrin
2006-12-22 12:21                 ` strong/weak typing terminology (was Re: [Caml-list] Scripting in ocaml) Daniel Bünzli
2006-12-22 16:51                   ` Tom
2006-12-22 17:34                     ` Daniel Bünzli
2006-12-22 18:16                     ` skaller
2006-12-22 18:47                       ` Daniel Bünzli
2006-12-22 19:42                         ` skaller
2006-12-22 20:03                           ` David Brown
2006-12-22 20:17                             ` Chad Perrin
2006-12-23  3:48                               ` skaller
2006-12-23  4:11                                 ` Chad Perrin
2006-12-22 20:19                           ` Chad Perrin
2006-12-23 12:58                           ` Daniel Bünzli
2006-12-23 16:06                             ` Chad Perrin
2006-12-23 21:50                               ` Tom
2006-12-26  6:10                                 ` Chad Perrin
2006-12-22 20:14                   ` Chad Perrin
2006-12-21 21:11             ` [Caml-list] Scripting in ocaml Serge Aleynikov
2006-12-21 21:27               ` Philippe Wang
2006-12-21 22:06                 ` Serge Aleynikov
2006-12-22 12:35                 ` Jon Harrop
2006-12-21 22:19               ` Chad Perrin
2006-12-22 12:37                 ` Jon Harrop
2006-12-22 18:52                   ` Chad Perrin
2006-12-22  2:51               ` skaller
2006-12-22 15:20                 ` Jon Harrop
2006-12-22 11:32               ` Jon Harrop
2006-12-23 18:50           ` Jon Harrop
2006-12-24  0:15             ` Serge Aleynikov
2006-12-24  3:30             ` skaller
2006-12-21 14:59 ` Richard Jones
2006-12-21 20:27   ` Chad Perrin
2006-12-21 23:35   ` Martin Jambon
2006-12-26 17:14 ` Aleksey Nogin
2006-12-26 23:36   ` Ian Zimmerman
2006-12-27 18:25     ` Aleksey Nogin
2006-12-27 18:39       ` Richard Jones
2006-12-27 19:20         ` Aleksey Nogin

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=458AA143.3090303@hq.idt.net \
    --to=serge@hq.idt.net \
    --cc=caml-list@inria.fr \
    --cc=skaller@users.sourceforge.net \
    /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).