OO, lexical scope, closure, tail-recursion, continuation 
Author Message
 OO, lexical scope, closure, tail-recursion, continuation

Kim:

Quote:
>I think OOP is a useful extension to APL. IMO, this is the best way to add
>user defined data types to APL...
>Object Oriented Programming Features give the ability to a user to add
>a new data type such as packed Roman numerals.  Smalltalk implementations
>prove that this capability can be added with acceptable efficiency.

Would implementing APL types/arrays/primitives using OO on top of SCHEME be
efficient enough?  I'm not sure array types in Smalltalk are at all acceptably
fast.  Implementing arrays (matrices) on top of Smalltalk is hopeless I think.
(Yes there are many smalltalks out there; but I'm really not impressed with
performance or the model-view-controller protocol.)

Re: necessity of lexical scope, closure, tail-recursion, continuation

I'm not sure they absolutely need to be "visible" to the APL/J programmer.
They are necessary for _implementing_ environment and control using SCHEME.
Tail-recursion and continuation-passing can be hidden with macros etc.
If closures are only used implicitly (passed as funargs etc. but not
assigned to variables) then they can be completely "transparent".  Lexical
scoping of nested functions is quite intuitive and standard in Pascal etc.;
in fact dynamic scoping would surely seem like a bug to the user!




Tue, 04 Mar 1997 17:39:45 GMT  
 OO, lexical scope, closure, tail-recursion, continuation
Bill Chang:

Quote:
> Would implementing APL types/arrays/primitives using OO on top of SCHEME be
> efficient enough?

We should try and see.  Meroon has a specialialized quick dispatcher that
calls a primitive dispatch function first which could be in C.  As for implementing
arrays as objects in OO, since we already have array libraries in C, use them.
Use existing sparce array libraries for sparce arrays, and use the OO for
prototyping and user extension.

Quote:
>Implementing arrays (matrices) on top of Smalltalk is hopeless I think.

True.

Quote:
> Re: necessity of lexical scope, closure, tail-recursion, continuation

> I'm not sure they absolutely need to be "visible" to the APL/J programmer.

If we use a scheme base, they come for free.  If you want to try out alternatives
to current APL, they are the basics from which most things can be reasonably
built.

-David



Wed, 05 Mar 1997 10:18:28 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Lexical scope and closures

2. Nested scopes and lexical closures

3. Tail recursion/continuations in C (CBOYER 1.3)

4. Tail recursion/continuations in C (CBOYER 1.3)

5. Tail Recursion/continuations in C (CBOYER 1.3)

6. Tail recursion and complete recursion?

7. Lexical Closures in Dylan

8. Are Agents Lexical Closures?

9. Yet Another Idea for lexical closures in Python

10. Compiling lexical closures in Common Lisp

11. Lambda-expression and lexical closure

12. CL and lexical closures

 

 
Powered by phpBB® Forum Software