Strings are character sequences, count is a better option to stay
within the sequence abstraction.
Lic P.
> count does some type checks, but it's negligible in most cases as I already
> said. len can give a clear intention than count somtimes.
>
> I'm not suggesting that it should be included in clojure.string, but if
> count is currently not preferred over .length, including it can be a good
> option.
>
>
> On Wednesday, October 30, 2013 7:50:04 PM UTC+9, Baishampayan Ghose wrote:
> >
> > What'd clojure.string/len do any differently than clojure.core/count?
> > count already provides does the fastest possible thing for strings.
> > ~BG
> >
> > On Wed, Oct 30, 2013 at 4:14 PM, Alice <
doff...@gmail.com <javascript:>>
> > wrote:
> > > Which one is preferred?
> > >
> > > .length needs to be type hinted, so more verbose.
> > > The performance penalty of count is negligible in most cases.
> > >
> > > I think including len in clojure.string would be a good idea because
> > it's
> > > used so often.
> > >
> > > --
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Clojure" group.
> > > To post to this group, send email to
clo...@googlegroups.com<javascript:>
> > > Note that posts from new members are moderated - please be patient with
> > your
> > > first post.
> > > To unsubscribe from this group, send email to
> > >
clojure+u...@googlegroups.com <javascript:>
> > > For more options, visit this group at
> > >
http://groups.google.com/group/clojure?hl=en
> > > ---
> > > You received this message because you are subscribed to the Google
> > Groups
> > > "Clojure" group.
> > > To unsubscribe from this group and stop receiving emails from it, send
> > an
> > > email to
clojure+u...@googlegroups.com <javascript:>.
Luc Prefontaine<
lprefo...@softaddicts.ca> sent by ibisMail!