Ilya Zakharevich on Thu, 26 Oct 2006 23:35:56 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: New experimental GP parser release 2.4.1.bill-3 |
On Mon, Oct 16, 2006 at 11:40:39PM +0200, Bill Allombert wrote: > The plan calls for a new PARI object the closure: > > A closure C are t_VEC with two components: > gel(C, 1) is a t_VECSMALL ("bytecode") > gel(C, 2) is a t_VEC ("data")". > > The quirk is that C[2] can contains closures as components, so > this is recursive. > > A closure is a perfectly standard GEN object and can be handled > in the same way. I do not think we want to have closures BEFORE the major problems with dynamic variable lookup are well understood. For the simplest case, consider ? f(x_y_z) = 11 ? ?0 f x x_y_z Why did x_y_z jump into existence? This variable should have no visibility outside of f(): ? x_y_z(ttt) = 44 *** unused characters: x_y_z(ttt)=44 ^-------- When one feels that semantic of variables is documented well enough, one can ask for semantic of anonymous functions; IMO, not in the other order. Yours, Ilya