This one smells funny to me... Object>>#browse ^ self systemNavigation browseClass: self class A less surprising API might be: - Object>>#browseClass - and, Class>>#browse as implemented above What do you think? ----- Cheers, Sean -- View this message in context: http://forum.world.st/Browse-anObject-tp4788401.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
I agree. Doru On Tue, Nov 4, 2014 at 7:20 PM, Sean P. DeNigris <sean@clipperadams.com> wrote:
This one smells funny to me...
Object>>#browse ^ self systemNavigation browseClass: self class
A less surprising API might be: - Object>>#browseClass - and, Class>>#browse as implemented above
What do you think?
----- Cheers, Sean -- View this message in context: http://forum.world.st/Browse-anObject-tp4788401.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
-- www.tudorgirba.com "Every thing has its own flow"
I guess that the intention was to use it like this Smalltalk browse. World browse. In case you do not know whether a global is a class or not... 2014-11-04 20:43 GMT+01:00 Tudor Girba <tudor@tudorgirba.com>:
I agree.
Doru
On Tue, Nov 4, 2014 at 7:20 PM, Sean P. DeNigris <sean@clipperadams.com> wrote:
This one smells funny to me...
Object>>#browse ^ self systemNavigation browseClass: self class
A less surprising API might be: - Object>>#browseClass - and, Class>>#browse as implemented above
What do you think?
----- Cheers, Sean -- View this message in context: http://forum.world.st/Browse-anObject-tp4788401.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
-- www.tudorgirba.com
"Every thing has its own flow"
Sean P. DeNigris wrote:
This one smells funny to me...
Object>>#browse ^ self systemNavigation browseClass: self class
A less surprising API might be: - Object>>#browseClass - and, Class>>#browse as implemented above
What do you think?
----- Cheers, Sean
In GTInspector, right click on an object and you get the option: * Browse which takes you to view the code. In old inspector, right click on an object you get three options: * Browse Full * Browse Class * Browse Hierarchy which takes you to various different code viewers. Together I think this shows its fairly well established that 'Browse' on its own means "view the object's code". Its established that menu options effectively map to messages sent to the object. So then would you need to change the four menu items above to: * Browse Class * Browse Class Full * Browse Class Class * Browse Class Hierarchy. Then I think you'd need to follow through changing all senders of #fullOnClass: from #browse... to #browseClass... Also, is there any foreseeable situation where a "Browse" menu would provide a function that is not code viewing, that Explore and Inspect would not cover? So in this case, because of the paradigm of mapping from menu items to message sends, unless the menu options change to suit, I think the behaviour expected from #browse is reasonably well defined and the implementation is fine. cheers -ben
Ben Coman wrote
I think this shows its fairly well established that 'Browse' on its own means "view the object's code"
I still vote to change it to more clearly reveal the intention. While perhaps not particularly significant in itself, all these little "gotchas" pile up for newbies, and rob mental energy from everyone's creative expression. Alan Kay ballparked Squeak at "Encyclopedia Brittanica" LOC, down from Windows' "Empire State Building" LOC, but IMHO mastering an entire Encyclopedia is hard enough without a lot of special cases. ----- Cheers, Sean -- View this message in context: http://forum.world.st/Browse-anObject-tp4788401p4788460.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Sean P. DeNigris wrote:
Ben Coman wrote
I think this shows its fairly well established that 'Browse' on its own means "view the object's code"
I still vote to change it to more clearly reveal the intention. While perhaps not particularly significant in itself, all these little "gotchas" pile up for newbies, and rob mental energy from everyone's creative expression. Alan Kay ballparked Squeak at "Encyclopedia Brittanica" LOC, down from Windows' "Empire State Building" LOC, but IMHO mastering an entire Encyclopedia is hard enough without a lot of special cases.
----- Cheers, Sean
I thought more on this during the day and came to the conclusion that the least surprising would be... Object>>#browseClass ^ self systemNavigation browseClass: self class Object>>#browse self browseClass but its just a passing thought, and not a big deal. cheers -ben
2014-11-05 12:29 GMT+01:00 Ben Coman <btc@openinworld.com>:
Sean P. DeNigris wrote:
Ben Coman wrote
I think this shows its fairly well established that 'Browse' on its own means "view the object's code"
I still vote to change it to more clearly reveal the intention. While perhaps not particularly significant in itself, all these little "gotchas" pile up for newbies, and rob mental energy from everyone's creative expression. Alan Kay ballparked Squeak at "Encyclopedia Brittanica" LOC, down from Windows' "Empire State Building" LOC, but IMHO mastering an entire Encyclopedia is hard enough without a lot of special cases.
----- Cheers, Sean
I thought more on this during the day and came to the conclusion that the least surprising would be...
Object>>#browseClass ^ self systemNavigation browseClass: self class
Object>>#browse self browseClass
I find Object>>#browse self class browse perfectly clear as well. And removes one unneeded selector on Object. Thierry
but its just a passing thought, and not a big deal. cheers -ben
On 05 Nov 2014, at 13:04, Thierry Goubier <thierry.goubier@gmail.com> wrote:
2014-11-05 12:29 GMT+01:00 Ben Coman <btc@openinworld.com <mailto:btc@openinworld.com>>: Sean P. DeNigris wrote: Ben Coman wrote I think this shows its fairly well established that 'Browse' on its own means "view the object's code"
I still vote to change it to more clearly reveal the intention. While perhaps not particularly significant in itself, all these little "gotchas" pile up for newbies, and rob mental energy from everyone's creative expression. Alan Kay ballparked Squeak at "Encyclopedia Brittanica" LOC, down from Windows' "Empire State Building" LOC, but IMHO mastering an entire Encyclopedia is hard enough without a lot of special cases.
----- Cheers, Sean
I thought more on this during the day and came to the conclusion that the least surprising would be...
Object>>#browseClass ^ self systemNavigation browseClass: self class
Object>>#browse self browseClass
I find
Object>>#browse self class browse
perfectly clear as well. And removes one unneeded selector on Object.
Yes, that is good.
Ben Coman wrote
I thought⦠the least surprising would be...
Object>>#browse self browseClass
This was exactly what I was objecting to. How is #browse sent to anObject not surprising when you mean #browseClass (which already exists)? Saying that "what else could browse mean in this context?" looks at the issue from someone who is already an expert. The point is that it may mean nothing to a newbie, and rightly so because IMHO it /is/ meaningless. ----- Cheers, Sean -- View this message in context: http://forum.world.st/Browse-anObject-tp4788401p4788650.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
:) we can rename browse into browseClass. On 6/11/14 00:07, Sean P. DeNigris wrote:
Ben Coman wrote
I thought⦠the least surprising would be...
Object>>#browse self browseClass This was exactly what I was objecting to. How is #browse sent to anObject not surprising when you mean #browseClass (which already exists)? Saying that "what else could browse mean in this context?" looks at the issue from someone who is already an expert. The point is that it may mean nothing to a newbie, and rightly so because IMHO it /is/ meaningless.
----- Cheers, Sean -- View this message in context: http://forum.world.st/Browse-anObject-tp4788401p4788650.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
No I like it as it is. Simple and straight to the point. And since browse could apply to a variety of things while browseClass is very specific, similarl to what Ben is saying. I would prefer it for example if I wanted to browse the metaclass of Object to have Object class browse while for the instance side a Object browse would do, That gives browse message a context sensitive/dependant meaning which for me is what OO is all about while your browseClass goes against the same principle. On other hand I have an allergy to camel case anyway :D On Tue, Nov 4, 2014 at 8:20 PM, Sean P. DeNigris <sean@clipperadams.com> wrote:
This one smells funny to me...
Object>>#browse ^ self systemNavigation browseClass: self class
A less surprising API might be: - Object>>#browseClass - and, Class>>#browse as implemented above
What do you think?
----- Cheers, Sean -- View this message in context: http://forum.world.st/Browse-anObject-tp4788401.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
participants (8)
-
Ben Coman -
kilon alios -
Marcus Denker -
Nicolas Cellier -
Sean P. DeNigris -
stepharo -
Thierry Goubier -
Tudor Girba