Mikhail Fursov wrote:
Guys,
What do you think about the following recomendations?
These are only 'recomendations' and not must have rules, but if these
recomendations will become 'official' it will improve the quality of API in
the long perspective.

1) Try avoid "magic number" nor "magic strings" in code ( the constant name
by itself can be a good comment )

That's a universal rule of programming, isn't it? :)

2) Try to make all objects used for synchronization 'final'  (we have a lot
of non-final monitors in API, so we give a chance to bugs)
3) Never call to Boolean of Integer contructors (performance issue, there
are a lot of such calls in our API)
4) Never do manual array copying (our crypto API does )
5) Check if it's possible to make method static or private (performance
issue, will help to devirtualizer a lot)

I'm happy if you note these, but explain why, and lets not call them "the law", as I'm sure that there will be situations where people will need to violate...

geir




On 5/25/06, Geir Magnusson Jr <[EMAIL PROTECTED]> wrote:

Nice!  Well done!






---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to