possible QA rule - cascading to class

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

possible QA rule - cascading to class

Ben Coman
In case someone close to managing the QA rules is interested... on discord it 
was suggested that this form of cascading might be a trap for newcomers.  

       x := MyClass new; foo  

I've never seen similar in practice, so it might make a good QA rule.  
It currently raises "Sends unknown message to global"
but I'd guess a more specific message that actually mentions 
"cascading" could be possible.

cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: possible QA rule - cascading to class

Christopher Fuhrman-2
Hi Ben,

On Tue, 18 Dec 2018 at 14:52, Ben Coman <[hidden email]> wrote:
In case someone close to managing the QA rules is interested... on discord it 
was suggested that this form of cascading might be a trap for newcomers.  

       x := MyClass new; foo  

I've never seen similar in practice, so it might make a good QA rule.  
It currently raises "Sends unknown message to global"
but I'd guess a more specific message that actually mentions 
"cascading" could be possible.


I was the one who brought it up on Discord, being it seems the forever newbie with Pharo... 

It's worse if you have a class-side method. The error is "Instance of X class did not understand #foo", which is evil to newbies because an "instance of [a] class" seems like it should be an object, and I *did* have a message of type "foo" defined. Here's the real case with a screenshot:

image.png

Cheers, 
Christopher
 
cheers -ben