[OSM-dev] Josm-patches and osm-lib was:OSM Date Formats

Shaun McDonald shaun at shaunmcdonald.me.uk
Tue Oct 2 19:24:28 BST 2007

On 2 Oct 2007, at 09:47, Frederik Ramm wrote:

> Hi,
>> I offer to refactor some of the josm-code to have
>> getters+setters (instead of public properties), parameter-checking,
>> error-messages and exception-handling after I'm back from vacation
>> next week.
> No, please don't do that. Having public properties and very little
> exception stuff is a deliberate design choice that Imi made and it
> worked well for us. I know that it is not exactly popular in Java
> circles but Imi had good reasons for it, and it is not ok to just
> throw all this overboard in order to make Eclipse happy. (And it
> doesn't paint JOSM code red with the default settings I am using..?)

Having public parameters is completely against everything I've been  
taught in my 4 year Computer Science degree. If you have public  
getters and setters for all required properties then there is nothing  
that you cannot do, that you can do with public properties. There are  
often properties that you don't want any old person to come along and  
modify, thus the use of getters and setters.

> At least, if you want to streamline JOSM in the manner you have
> described, discuss this with Imi and try to understand why he did it
> the way he did it.

It would be nice to hear why Imi chose this method. I think that it  
would be best that the reasons to be done publicly on the list, so  
that they are archived for the future.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2433 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20071002/ded6ad77/attachment.bin>

More information about the dev mailing list