Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #107200

[OT] Java generics (was: Guido sees the light: PEP 8 updated)

From Tim Delaney <timothy.c.delaney@gmail.com>
Newsgroups comp.lang.python
Subject [OT] Java generics (was: Guido sees the light: PEP 8 updated)
Date 2016-04-18 08:02 +1000
Message-ID <mailman.118.1460931049.6324.python-list@python.org> (permalink)
References <CAN8CLg=_5oBp5ehR_NgfjQcXuM5cWajAVdKT7BytKJ93r13L0Q@mail.gmail.com>

Show all headers | View raw


On 17 April 2016 at 23:38, Ian Kelly <ian.g.kelly@gmail.com> wrote:


> > Java generics ruined a perfectly good language. I mean:
>
> The diamond operator in JDK 7 makes this a lot more tolerable, IMO:
>
>     Map<AccountManager, List<Customer>> customersOfAccountManager =
>         new HashMap<>();
>

To some extent - you can't use the diamond operator when creating an
anonymous subclass, and you often need to explicitly specify the types for
generic methods. The inference engine is fairly limited.

I wouldn't say generics ruined Java - they made it better in some ways (for
a primarily statically-typed language) but worse in others (esp. that
they're implemented by erasure). I also wouldn't describe Java as a
"perfectly good language" - it is at best a compromise language that just
happened to be heavily promoted and accepted at the right time.

Python is *much* closer to my idea of a perfectly good language.

Tim Delaney

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[OT] Java generics (was: Guido sees the light: PEP 8 updated) Tim Delaney <timothy.c.delaney@gmail.com> - 2016-04-18 08:02 +1000
  Re: [OT] Java generics Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-04-18 20:32 +1200
    Re: [OT] Java generics Marko Rauhamaa <marko@pacujo.net> - 2016-04-18 12:11 +0300

csiph-web