On Mon, 24 Mar 2014 02:56:51 -0700 (PDT) Игорь Авдошкин wrote:
A lot of code is obtained with respect to Python!
1) I, for one, do not understand
print [x for x, y in collections.Counter(a).items() if y > 1]
without looking at the docs. So, yeah, I could contrive an
even more obscure encantation in, say, Perl. Using Haskell
presumably would gain an even more obscure solution.
I mean, the property of being consice does not imply the
properties of being lucid or even understandable.
2) A simpler version of the code for count == 1:
3) Why not return to Python then?
No, I'm not really trolling but I'm having hard time making
sense of the comment in the style of the one I'm replying to.
If you're not feeling "right" when working with a particular
language, do not use it. AFAIK, Go is not yet that ubuquitous
as, say, Java or C++, so I don't beleive you're forced to
program in Go for living.
On the other hand, Go strives to have as few as possible places
with *hidden performance costs* in the code, and it also strives
to be simple. And have fast compilation speed at the same time.
So the line has to be drawn somewhere, and IIUC why there's no
list comprehensions and stuff like that.
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
For more options, visit https://groups.google.com/d/optout.