[Cuis-dev] A question on same-named methods

Hilaire Fernandes hilaire at drgeo.eu
Sun Aug 15 07:59:11 PDT 2021


Phil already discussed what happens in that situation.

Now from a practical point of view, regarding Smalltalk way, the right 
move is to propose to the JSON package maintainer to add your class side 
method readFromString: to the JSON package.

After all, if you find this added method is convenient to read Json 
files, it is likely to be convenient for other users of the JSON package.

If the package maintainer does not agree, I don't know. May be the 
safest way will be to subclass Json in your own package and add the 
methods you need.

Best

Hilaire

Le 14/08/2021 à 19:46, Nicola Mingotti via Cuis-dev a écrit :
> I defined a method in my package 'Wunderbar', it is 'readFromString', 
> which
> goes into class 'Json class side' and method category '*Wunderbar-DB'.
>
> Now, suppose a day in the future I upgrade Cuis and 'readFromString'
> is now defined into 'Json class'. What will happen when i try to load 
> 'Wunderbar' package ?
>
> . Do i get an error for method name overlap ?
> . If not, is there any criteria by which one method should be called 
> instead of the other
> for example: looking at which method category it belongs to ?

-- 
GNU Dr. Geo
http://drgeo.eu
http://blog.drgeo.eu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20210815/b09ddb93/attachment.htm>


More information about the Cuis-dev mailing list