Proposal for implementing services in squeak, need feedback
rrobbes
rrobbes at info.unicaen.fr
Sat Apr 17 10:17:16 UTC 2004
Hi avi,
> it will send #requestClass, before invoking that block, based on the name
> of the argument. I really don't like this - argument names should not
> affect behavior. I do realize that you're trying to make the interface as
> concise as possible, but I don't think the tradeoff is worth it in this
> case. I would much rather, for example, just get passed the requestor
> directly:
>
> [:req | self doSomethingWith: req requestClass]
>
> It's a handful more characters, but much easier to trace through, and
> doesn't suddenly break if the source code disappears for some reason...
>
Hmmm .... I got to think more about that ... I was also worried
by the fact that it is tied to the source code. I think I'll experiment
both versions by myself to see the tradeoffs.
> I also find the use of strings as the main way to refer to services odd -
> I'd rather deal directly with the Service objects, and have them returned
> from some easily accessible method. For example, I'd prefer
>
> TheWorldMenu openService execute
>
> to
>
> 'open menu' executeService.
>
I've got to rework some things here too, I'm aware that using strings is
a bit fragile.
Anyways thanks for the feedback, please continue ... ;-)
Cheers,
Romain
More information about the Squeak-dev
mailing list
|