# RE: [stack] NameQuakes.

## Billy Tanksley — 2002-01-03 22:51:16

    From: John Carter [mailto:john.carter@...]

     >In a sense Joy is about stopping NameQuakes.

    >In practically every other language every time a function is

    >defined, or a function is invoked, a Name Quake occurs.

    >By Name Quake I mean that the Name Space, the space of names

    >has shifted and changed. Old names perhaps no longer mean what

    >they did.

     Why does Joy avoid this?

    I think I might know what you're saying, possibly.  Are you referring to the

    fact that currently defined local variables disappear, and a new set of

    locals gets defined?  That's an interesting point.  Yes, Joy does avoid

    that.

     >John Carter                             Phone : (64)(3) 358 6639

     -Billy

## Manfred von Thun — 2002-01-24 03:27:55

    On Thu, 3 Jan 2002, Billy Tanksley wrote:

     > From: John Carter [mailto:john.carter@...]

    >

    > >In a sense Joy is about stopping NameQuakes.

    > >In practically every other language every time a function is

    > >defined, or a function is invoked, a Name Quake occurs.

    > >By Name Quake I mean that the Name Space, the space of names

    > >has shifted and changed. Old names perhaps no longer mean what

    > >they did.

    >

    > Why does Joy avoid this?

    >

    > I think I might know what you're saying, possibly.  Are you referring to the

    > fact that currently defined local variables disappear, and a new set of

    > locals gets defined?  That's an interesting point.  Yes, Joy does avoid

    > that.

     This is partly due to the absence of formal parameters in function

    definitions. In lambda calculus based languages most such definitions

    use lambda abstraction at least internally:

       define  foo(x y z)  =  ...x..y..z...

    which is syntactic sugar for

       define  foo  =  lambda (x y z)  ...x..y..z...

    No matter which style of definition is used, any call to foo will

    have to supply actual parameters, the values for x y z on that call.

    In Joy there are no formal parameters, no environments of name/value

    pairs.

    But secondly, higher order functions such as map, fold, filter and so

    on require a function parameter. In lambda calculus based languages

    the actual parameter has to be a function given as a lambda abstraction

    with formal parameters.

    In Joy the actual parameter for higher order functions is a quotation,

    and no formal parameters are needed for that.

    I hope this helps.

      - Manfred

     >

    > >John Carter                             Phone : (64)(3) 358 6639

    >

    > -Billy