[ 
https://issues.apache.org/jira/browse/MATH-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12886916#action_12886916
 ] 

Ole Ersoy commented on MATH-361:
--------------------------------

I agree with the thinking there.  Also since each CM core library class (Say 
GammaDistribution) does not directly depend on GammaDistributionMessageEnum, 
these enums can easily exist in their own jar, separately from the core CM 
library (But should still be a part of CM).  The package namespace should stay 
the same also.  So for example if I look in the message enum jar under the 
namespace 
org.apache.commons.math.distribution I see:
* BetaDistributionMessageEnum
* BinomialDistributionMessageEnum
* CauchyDistributionMessageEnum
* Etc.

Also in order to make the javadoc for the core CM library less verbose, the use 
case description javadoc could go in the MessageEnum classes.  This way the 
core CM library stays very minimal and easy to maintain.  Having the per class 
enums also then provides a more natural home to place developer friendly 
comments on how to go about providing the best end user experience for a given 
core CM class.  This could also have a dual purpose as a best practice 
checklist to the developer, reminding them of things they should do when 
developing with a core library class.

Another thing is that if it's done like this, CM does not really have to care 
how the messages are resolved.  CM could provide a utility if it wants to 
(might as well since it needs to resolve the core minimal enum messages), but 
the application developer does not have to use this utility.   The application 
developer could resolve the enum messages using CAL10N if she wants to.




> Localization and Error Handling
> -------------------------------
>
>                 Key: MATH-361
>                 URL: https://issues.apache.org/jira/browse/MATH-361
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 2.1
>            Reporter: Gilles
>            Priority: Minor
>         Attachments: l10n.tar.gz, res.tar.gz
>
>
> This proposal aims at easing the handling of error during algorithms 
> development, and also enhancing the flexibility of the error reporting 
> (provide meaningful exception classes and run-time selection of the 
> localization formatting).
> More details at 
> [http://www.mail-archive.com/[email protected]/msg14570.html]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to