[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dual-language systems increase modularity



On 2003-11-17T19:08:17-0800, Steve Dekorte wrote:
> On Nov 17, 2003, at 6:05 PM, Ken Shan wrote:
> >The paper I cited earlier:
> >On 2003-11-17T18:13:41-0500, Ken Shan wrote:
> >>You might be interested in (the abstract and citations in) "A Model
> >>of Delegation Based on Existential Types" by Benjamin C. Pierce
> >>(http://www.cis.upenn.edu/~bcpierce/papers/delegation.ps).
> >contains executable code for delegation (it seems to be what you refer
> >to as "proxy") in a statically typed programming language.
> Ok, now which is easier to use and understand?

First of all, it seems to me that you have changed the topic or your
claim.  As Shriram pointed out earlier, your initial claim was that
"dynamic typing makes available a whole new level of more powerful and
flexible programming techniques", not that dynamic typing makes any
programming technique easier to use or understand.

In any case, it is certainly relevant to this mailing list which
implementation of proxy/delegation is easier to use and understand.
Given that what you wrote down in three lines of Io is equivalent (via
Pierce and Turner's encoding) to a single line of System F, namely

    fun(M: *->*) fun(p: Object(M)) p

-- or a single line of Haskell, namely

    id

-- it is difficult to say with statistical significance which
implementation is easier to use and understand.

But perhaps you meant to compare not just the code that we have chosen
to written down, but also the language implementation (from syntactic
sugar to assembly language) supporting that code, which neither of us
chose to show.  That would be a more involved comparison: one would
need to dig up or produce a machine-level implementation of System F
(excluding type-checking), and possibly compare its performance with
Io's.  This comparison may be tedious, but I don't think it would be
difficult; the reduction rules of System F can be described on a single
printed page.

	Ken

-- 
Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig
http://www.lp.org/

Attachment: signature.asc
Description: Digital signature