[Pharo-project] senders search symbols, class references shouldn't do it as well?
If I search senders of 'foo' I do get those method that has #foo inside. However, if I search class references to Bar, it doesn't found methods that have something like Smalltalk at: #Bar. shouldn't it also find this? thanks -- Mariano http://marianopeck.wordpress.com
On Jun 16, 2012, at 11:42 PM, Mariano Martinez Peck wrote:
If I search senders of 'foo' I do get those method that has #foo inside. However, if I search class references to Bar, it doesn't found methods that have something like Smalltalk at: #Bar. shouldn't it also find this?
This is not really possible. "senders of" is actually "has this symbol in the literal array". the class references, it searches for class bindings in the literal array. both are *very* simplistic. The system is not searching for "message sends" or "class references" at all. What you want would mean far more analysis, with real semantical knowledge that is not available on that level. Marcus -- Marcus Denker -- http://marcusdenker.de
On Sun, Jun 17, 2012 at 10:03 AM, Marcus Denker <marcus.denker@inria.fr>wrote:
On Jun 16, 2012, at 11:42 PM, Mariano Martinez Peck wrote:
If I search senders of 'foo' I do get those method that has #foo inside. However, if I search class references to Bar, it doesn't found methods that have something like Smalltalk at: #Bar. shouldn't it also find this?
This is not really possible. "senders of" is actually "has this symbol in the literal array".
the class references, it searches for class bindings in the literal array.
But what if class references search not only in the class bindings in the literal array but also symbol (as senders do) of its name (with case sensitive) ?
both are *very* simplistic. The system is not searching for "message sends" or "class references" at all.
What you want would mean far more analysis, with real semantical knowledge that is not available on that level.
Marcus
-- Marcus Denker -- http://marcusdenker.de
-- Mariano http://marianopeck.wordpress.com
On Jun 17, 2012, at 6:48 PM, Mariano Martinez Peck wrote:
On Sun, Jun 17, 2012 at 10:03 AM, Marcus Denker <marcus.denker@inria.fr> wrote:
On Jun 16, 2012, at 11:42 PM, Mariano Martinez Peck wrote:
If I search senders of 'foo' I do get those method that has #foo inside. However, if I search class references to Bar, it doesn't found methods that have something like Smalltalk at: #Bar. shouldn't it also find this?
This is not really possible. "senders of" is actually "has this symbol in the literal array".
the class references, it searches for class bindings in the literal array.
But what if class references search not only in the class bindings in the literal array but also symbol (as senders do) of its name (with case sensitive) ?
maybe... I wonder if it will not give strange false positives... What I would really like to have instead would be a higher level model for code that we could query *for real*. Marcus -- Marcus Denker -- http://marcusdenker.de
participants (2)
-
Marcus Denker -
Mariano Martinez Peck