Re: Rule Parameters

2005-03-01 Thread Larry Wall
On Tue, Mar 01, 2005 at 11:06:17PM -0600, Rod Adams wrote: : Since the line between rules and subs is already blurring significantly, : I want to blur it a little more. I want to write rules which can take : parameters. No problem. That's how the arguments to rules like are already passed. If

Re: Rule Parameters

2005-03-01 Thread Luke Palmer
Rod Adams writes: > Since the line between rules and subs is already blurring significantly, > I want to blur it a little more. I want to write rules which can take > parameters. No no no! That's too powerful. Wow, skimming through both S5 and A5 and I see no mention of such a thing. I know w

Rule Parameters

2005-03-01 Thread Rod Adams
Since the line between rules and subs is already blurring significantly, I want to blur it a little more. I want to write rules which can take parameters. Consider that I am parsing HTML (a very frequent occurrence), and wish to make a Rule that matches a balanced tag from open to close. I wa

Re: Dynamically Scoped Dynamic Scopes

2005-03-01 Thread Larry Wall
On Sun, Feb 27, 2005 at 10:52:58AM -0800, Dave Whipp wrote: : One could imagine implementing this by creating the scopes as instances : of an object, and then binding the object's attributes onto the : variables (i.e. "our $foo := $obj.bar"). The "scope space" object would : then be the set of g

Re: Valid hash keys?

2005-03-01 Thread Luke Palmer
Alex Burr writes: > On Sun, Feb 27, 2005 at 03:36:42PM -0700, Luke Palmer wrote: > > But the biggest problem is that if the user overloads 'equal' on two > > objects, the hash should consider them equal. We could require that to > > overload 'equal', you also have to overload .hash so that you've

Re: Valid hash keys?

2005-03-01 Thread Alex Burr
On Sun, Feb 27, 2005 at 03:36:42PM -0700, Luke Palmer wrote: > But the biggest problem is that if the user overloads 'equal' on two > objects, the hash should consider them equal. We could require that to > overload 'equal', you also have to overload .hash so that you've given > some thought to th