[Pharo-project] Adding method to Character

Tony Fleig tony.fleig at gmail.com
Thu Nov 11 17:14:48 CET 2010


I find myself wanting a Character>>isConsonant method in addition to the
existing Character>>isVowel method. It might be defined as

         ^ self isLetter & self isVowel not

My question is: what is the best way to do this?

Should I simply add the method to Character? If I do, I guess I must
remember to merge my Monticello changes into each new version of Character?
Is there some way to bundle this change in my package so I don't forget?

I have created a method in my class MyClass>>characterIsConsonant:
aCharacter, but it doesn't read well in the code.

I suppose I could add the method dynamically in my class's initialize
method... Not sure how to do that exactly.

Is there another way to do this that I haven't thought of?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/pharo-project/attachments/20101111/65c40fc9/attachment.htm>

More information about the Pharo-project mailing list