# RE: [stack] Re: Strictly typed lazy evaluated postfix languages w ith a lambda.

## Billy Tanksley — 2001-09-17 15:41:14

    From: Manfred von Thun [mailto:phimvt@...]

     >> Yes, it's called type inference.

    >Yes, but I don't know to what extent the existing technology

    >would apply to Joy - if at all.

     The existing technology is pretty simple: brute force 2^n search.  Well, at

    least at worst case, but that's actually pretty common.

    From what I've understood of StrongForth, the only reason to apply ML-style

    type inferencing to it is if you wanted to overload on the return types as

    well as the parameter types.

     >I have recetnly looked at streams in Scheme again,

    >Abelson and Sussman, Structure and interpretation of Computer Programs.

    >I think one might be able to do something resembling lazy

    >evaluation in Joy. I say "resembling", because there is a huge

    >difference.

     I wrote a while ago about 'diligent order' (everything executed ASAP) as

    compared to 'lazy order' (nothing executed until needed), 'applicative

    order' (parameters executed before their functions), and 'concatenative

    order' (strict left to right).  I suspect that diligent order is the closest

    concatenative equivalent to lazy order.

     >  -Manfred

     -Billy

## md9slj@mdstud.chalmers.se — 2001-09-17 23:02:19

    --- In concatenative@y..., Billy Tanksley <wtanksley@b...> wrote:

     > From: Manfred von Thun [mailto:phimvt@l...]

    > >> Yes, it's called type inference.

    > >Yes, but I don't know to what extent the existing technology

    > >would apply to Joy - if at all.

    >

    > The existing technology is pretty simple: brute force 2^n search.

     Well, at

     > least at worst case, but that's actually pretty common.

     Do you mean the complexity of type inferencing ?

    (I think I read that, at least in ML, one rarely in practice come

     anyway near the worst case.

     (http://www.brics.aau.dk/BRICS/LS/95/3/

      BRICS-LS-95-3/BRICS-LS-95-3.html , PostScript page 14 - 17)

    )

     > From what I've understood of StrongForth, the only reason to apply

     ML-style

     > type inferencing to it is if you wanted to overload on the return

     types as

     > well as the parameter types.

     (I'm mostly interested in the subject on it's own merits)

     > >I have recetnly looked at streams in Scheme again,

    > >Abelson and Sussman, Structure and interpretation of Computer

     Programs.

     > >I think one might be able to do something resembling lazy

    > >evaluation in Joy. I say "resembling", because there is a huge

    > >difference.

    >

    > I wrote a while ago about 'diligent order' (everything executed

     ASAP) as

     > compared to 'lazy order' (nothing executed until needed),

     'applicative

     > order' (parameters executed before their functions), and

     'concatenative

     > order' (strict left to right).  I suspect that diligent order is the

     closest

     > concatenative equivalent to lazy order.

     (Is ASAP = As Soon As Possible, if so, then diligent order seems, to

     me to be as far as possible from lazy order. Correct me if I'm wrong.

    )

     > >  -Manfred

    >

    > -Billy

     --

    Stefan Lj

    md9slj

## Billy Tanksley — 2001-09-18 18:29:14

    From: md9slj@... [mailto:md9slj@...]

     >--- In concatenative@y..., Billy Tanksley <wtanksley@b...> wrote:

    >> From: Manfred von Thun [mailto:phimvt@l...]

    >> >> Yes, it's called type inference.

    >> >Yes, but I don't know to what extent the existing technology

    >> >would apply to Joy - if at all.

    >> The existing technology is pretty simple: brute force 2^n search.

    >> Well, at least at worst case, but that's actually pretty common.

    >Do you mean the complexity of type inferencing ?

    >(I think I read that, at least in ML, one rarely in practice come

    > anyway near the worst case.

    > (http://www.brics.aau.dk/BRICS/LS/95/3/

    >  BRICS-LS-95-3/BRICS-LS-95-3.html , PostScript page 14 - 17)

    >)

     Ah.  My understanding was that brute force wasn't a problem because all of

    the languages which use that typing system use it on a function-by-function

    basis, and programmers in those languages tend to keep their functions very

    short.

    But I haven't programmed in ML for a long time.

     >> I wrote a while ago about 'diligent order' (everything executed

    >> ASAP) as

    >> compared to 'lazy order' (nothing executed until needed),

    >> 'applicative

    >> order' (parameters executed before their functions), and

    >> 'concatenative

    >> order' (strict left to right).  I suspect that diligent order is the

    >> closest concatenative equivalent to lazy order.

    > Is ASAP = As Soon As Possible,

     Yes.

     > if so, then diligent order seems, to

    > me to be as far as possible from lazy order. Correct me if I'm wrong.

     You're absolutely right.  And concatenative order is the farthest thing

    possible from applicative order.  It only makes sense that the same theory

    should fail to apply to both concatenative and applicative evaluation.

     >Stefan Lj

     -Billy