abstract class WriteInterceptor {
set(target, value, Member member);
}
abstract class InvokeInterceptor {
invoke(target, List positionalArguments, Map<Symbol,dynamic> namedArguments,
Member member);
}
I would like to propose that we change member to always be the 2nd argument:
abstract class WriteInterceptor {
set(target, Member member, value);
}
abstract class InvokeInterceptor {
invoke(target, Member member, List positionalArguments,
Map<Symbol,dynamic> namedArguments);
}
This is more intuitive, because it looks more like the calls its actually intercepting. For example when assigning a property:
foo.bar = 'baz';
The set method would be called with foo, a member whose name is #bar, and the value 'baz', in that order. With the current semantics 'baz' would come before the member with name #bar, which isn't as intuitive.
Currently the proposal is the following:
I would like to propose that we change
member
to always be the 2nd argument:This is more intuitive, because it looks more like the calls its actually intercepting. For example when assigning a property:
The set method would be called with
foo
, a member whose name is#bar
, and the value'baz'
, in that order. With the current semantics'baz'
would come before the member with name#bar
, which isn't as intuitive.