commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amey Jadiye <ameyjad...@gmail.com>
Subject Re: commons-lang3: Too early to deprecate RandomStringUtils in favor of RandomStringGenerator ?
Date Sun, 03 Sep 2017 15:44:43 GMT
Yes.

Regards,
Amey

On Sun, Sep 3, 2017 at 9:06 PM, Philippe Mouawad <philippe.mouawad@gmail.com
> wrote:

> Hi Again,
> What is the expected schedule for this plan ?
> Will it be available in commons-text-1.2 ?
>
> Thanks
>
> On Sun, Sep 3, 2017 at 4:28 PM, Amey Jadiye <ameyjadiye@gmail.com> wrote:
>
> > Hello Philippe,
> >
> > Looking at similar kind of demand we are thinking to execute below plan,
> I
> > think it will be good for your expectations.
> >
> > http://markmail.org/message/azxw4nai7fs2laas
> >
> > Regards,
> > Amey
> >
> > On Sun, Sep 3, 2017 at 6:26 PM, Philippe Mouawad <pmouawad@apache.org>
> > wrote:
> >
> > > Hello,
> > > Since version 3.6 of commons-lang3, RandomStringUtils has been
> deprecated
> > > following introduction of commons-text.
> > >
> > > Looking at current 1.1 version (and even snapshot 1.2) I wonder if it's
> > not
> > > too early for deprecation.
> > >
> > > RandomStringUtils was very simple and intuitive to use. I don't
> remember
> > I
> > > ever had to think when using it :-)
> > >
> > > RandomStringGenerator is nice in terms of API and much more powerful
> for
> > > advanced usage, but it looks to me much more complex to use for simple,
> > > average cases:
> > >
> > >    - RandomStringUtils.random ? => Is this the equivalent
> > >    - new RandomStringGenerator.Builder()
> > >                   .filteredBy(CharacterPredicates.LETTERS)
> > >                   .build();
> > >       - I don't get exactly the same results ? Is it due to Unicode
> > chars ?
> > >       - RandomStringUtils.randomAlphabetic(count) => new
> > >    RandomStringGenerator.Builder()
> > >                .withinRange('0', 'z')
> > >                .filteredBy(CharacterPredicates.LETTERS,
> > >    CharacterPredicates.DIGITS)
> > >                .build().generate(count)
> > >
> > > What about use cases when count and source chars are configurable :
> > >
> > >    - RandomStringUtils.random(count, chars)
> > >    - => Are we supposed to build each time the generator ?
> > >
> > > Is it as efficient in terms of CPU and memory usage as
> RandomStringUtils
> > > equivalent ?
> > >
> > > Sorry if my questions are stupid.
> > >
> > > Thanks
> > >
> > > Regards
> > >
> >
> >
> >
> > --
> >
> > ---------------------------------------------------------------------
> >
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
>
>
>
> --
> Cordialement.
> Philippe Mouawad.
>



-- 

---------------------------------------------------------------------

To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org

For additional commands, e-mail: dev-help@commons.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message