Login  Register

Re: Dealing with multiple cases of a string while keeping code short and OOP friendly

Posted by kilon.alios on Mar 10, 2015; 12:18pm
URL: https://forum.world.st/Dealing-with-multiple-cases-of-a-string-while-keeping-code-short-and-OOP-friendly-tp4810731p4810923.html

I have seen a similar pattern in Kent Beck book Smalltalk Patterns , but I was not sure this was a good way to go in this case .

So I thought that would not hurt to ask for a second opinion from a more experienced Pharo coder.

On Tue, Mar 10, 2015 at 12:03 AM, Sean P. DeNigris <[hidden email]> wrote:
kilon.alios wrote
> oh Sean this so beautiful and elegant
>   class := self subclasses detect: [ :c | c pythonClassName =
> pythonClassName

Yes I like/use this pattern a lot! I think I learned it from "A Mentoring
Course on Smalltalk"



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/Dealing-with-multiple-cases-of-a-string-while-keeping-code-short-and-OOP-friendly-tp4810731p4810790.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.