On Fri, Oct 03, 2008 at 06:23:42AM -0700, I Sop wrote: > > From: Patrick R. Michaud via RT <[EMAIL PROTECTED]> > > On Thu, Oct 02, 2008 at 02:16:01PM -0700, I Sop wrote: > > > > > > I just copied the 'attribute' method, renamed > > > everything, and changed the parameter order for the > > > 'getprop' op. > > > > Why should this be a PAST::Var node as opposed to simply > > using a PAST::Op node with :pirop('getprop') and/or > > :pirop('setprop') ? > > Why is this different than attribute access?
I don't know -- I didn't add the attribute access code either. :-) I'll have to think about it some. But the intent of PCT is to model the most common constructs that appear in HLLs, not to provide a separate node type for every possible construct or operation that happens to be available. So it may just come down to the fact that there are a lot of HLLs that make use of object attribute access, but very few that do properties. Stated another way: I'm just looking for a compelling use case that indicates that we really ought to have property support in PAST::Var before actually adding it. The ideal use case for PCT is "because it makes writing a compiler easier", but I probably want to see examples. Pm