Novel form of refactoring

Brian T Rice water at tunes.org
Fri Oct 24 21:59:58 UTC 2003


On Fri, 24 Oct 2003, Marcus Denker wrote:

> On Fri, Oct 24, 2003 at 12:12:15PM -0700, Eric Merritt wrote:
> > > class := Smalltalk allClasses atRandom.
> > > Browser fullOnClass: class selector: (class
> > > methodDict keys atRandom).
> >
> >  Thats it, more or less, amazing difference in code
> > size isn't it.
> >
> Yes, but it doesn't do any error checks: "class methodDict" could
> be empty. For a demo it should be enough to do
>
> [
> class := Smalltalk allClasses atRandom.
> Browser fullOnClass: class selector: (class methodDict keys atRandom]
> ] on: Error do: [:e | e retry]
>
> but "on: Error do: [:e | e retry]" isn't a good idea for production code,
> really not ;-))
>
>    Marcus

I also think the code side comparison is really unfair, considering that
the emacs code contains a simple interface for the user, and specifically
for defining a scope within which to search: after all, I don't want to
jump to Balloon code when I have no idea what's crufty and what's not. So
without that, it's less than helpful, leading you to code positions that
you know nothing about. (like the newbie clicking around randomly in the
Browser to see what code is like... I know they do this :)

-- 
Brian T. Rice
LOGOS Research and Development
http://tunes.org/~water/



More information about the Squeak-dev mailing list