Re: IDEA: lexically scoped subs anyone

2000-09-30 Thread Simon Cozens
On Sat, Sep 30, 2000 at 03:48:07PM +0300, Ariel Scolnicov wrote: > This is done in Lisp, and other functional languages. Lisp lets you > declare mutually recursive objects using the (letrec ...) form. In > Scheme, say: > > (letrec ((even? (lambda (x) (if (= x 0) t (odd? (- x 1) >

Re: IDEA: lexically scoped subs anyone

2000-09-30 Thread Ariel Scolnicov
Simon Cozens <[EMAIL PROTECTED]> writes: > On Fri, Sep 29, 2000 at 04:13:46PM +0100, Piers Cawley wrote: > > Did anyone suggest the following yet? > > package Foo; > > my sub _helper_function { ... } > > Todo: > lexically scoped functions: my sub foo { ... } > the basic conce

Re: IDEA: lexically scoped subs anyone

2000-09-29 Thread David L. Nicol
Dave Storrs wrote: > > On 29 Sep 2000, Piers Cawley wrote:[EMAIL PROTECTED] > > > Is it possible? Advisable? > > I haven't seen it yet, but that doesn't mean it's not in there > somewhere...there's a bunch of RFCs I haven't had time to read. If it > isn't there, it should be. I think

Re: IDEA: lexically scoped subs anyone

2000-09-29 Thread Dave Storrs
On 29 Sep 2000, Piers Cawley wrote: > Is it possible? Advisable? I haven't seen it yet, but that doesn't mean it's not in there somewhere...there's a bunch of RFCs I haven't had time to read. If it isn't there, it should be. I think this is definitely a cool idea.

Re: IDEA: lexically scoped subs anyone

2000-09-29 Thread Simon Cozens
On Fri, Sep 29, 2000 at 04:13:46PM +0100, Piers Cawley wrote: > Did anyone suggest the following yet? > package Foo; > my sub _helper_function { ... } Todo: lexically scoped functions: my sub foo { ... } the basic concept is easy and sound, the difficulties begin with

IDEA: lexically scoped subs anyone

2000-09-29 Thread Piers Cawley
Did anyone suggest the following yet? package Foo; my sub _helper_function { ... } sub public_function { ... helper_function(...); ... } # Some other file: use Foo; Foo::public_function(@args); # Okay Foo::_helper_function(@args); # Th