commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TEXT-36) Dependency on "Commons RNG"
Date Fri, 06 Jan 2017 01:41:59 GMT

    [ https://issues.apache.org/jira/browse/TEXT-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15803179#comment-15803179
] 

Gilles commented on TEXT-36:
----------------------------

bq. if I \[...\] wasn't interested in the class generating random strings

Whether the feature is out-of-scope is a good question.
For this issue, the assumption was that the class is there already.

bq. dependency on a random number generator library \[is\] a strange thing for a text library
to depend on

We agreed on that.
The "<optional>" tag would not impose a transitive dependency.

bq. I would go with the TextRandomProvider interface scheme EXCEPT that it should be eligible
to be a functional interface

Fine.
You are welcome to implement it. :)

bq. Then in the javadoc for the class put examples using commons-rng

+1


> Dependency on "Commons RNG"
> ---------------------------
>
>                 Key: TEXT-36
>                 URL: https://issues.apache.org/jira/browse/TEXT-36
>             Project: Commons Text
>          Issue Type: Improvement
>            Reporter: Gilles
>              Labels: api
>             Fix For: 1.1
>
>
> This is a follow-up of a [discussion|https://issues.apache.org/jira/browse/TEXT-34?focusedCommentId=15762623&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15762623]
held in TEXT-34.
> IMHO, there is no harm in depending on the ["commons-rng-client-api" module|http://commons.apache.org/proper/commons-rng/commons-rng-client-api/javadocs/api-1.0/index.html]
of Commons RNG; the "zero dependency" mantra does not hold here, since TEXT already depends
on LANG.
> OTOH, I see that it is counter-productive (i.e. it harms the Commons project as a whole)
to not advertize or use other Commons components, despite the "own dog food" phrase appearing
recurrently on the "dev" ML.
> Rather than having people blindly use {{java.util.Random}}, we should allow them to choose
wisely, based on full information.
> IMO, that means to indeed use {{UniformRandomProvider}} in order to raise awareness about
alternatives to the sub-optimal algorithm used by the JDK.
> However, if some Commons developers do not trust that the {{UniformRandomProvider}} interface
can be stable enough for TEXT, then we should follow Jochen Wiedemann's advice (cf. archive
of the "dev" ML) and define TEXT's own interface to random numbers, with bridges to it from
{{UniformRandomProvider}} and from {{java.util.Random}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message