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


Groups > comp.lang.python > #79931

Re: optional types

References (1 earlier) <mailman.15302.1414601774.18130.python-list@python.org> <18fa60be-225e-422d-82de-902c4a0c66da@googlegroups.com> <545127D8.1040408@stoneleaf.us> <mailman.15305.1414605822.18130.python-list@python.org> <87vbn268oc.fsf@elektro.pacujo.net>
Date 2014-10-30 05:43 +1100
Subject Re: optional types
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.15306.1414608221.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, Oct 30, 2014 at 5:18 AM, Marko Rauhamaa <marko@pacujo.net> wrote:
> Chris Angelico <rosuav@gmail.com>:
>
>> Yes, but if it's official, the standard library (large parts of it, at
>> least) will use it, which will make it a lot more useful than it
>> currently is.
>
> I doubt it. Python should decide if it wants to stay Python or become
> another Java. I don't really believe in this "be everything for
> everybody" thing. You'll only become nothing for anybody.

Mebbe. More likely, Python wants to lift ideas from anyone and
everyone. List comprehensions came from the functional world, flexible
string representation came from Pike or bash (or was independently
invented), etc, etc.

Python won't turn into Java. The biggest philosophical difference
between the languages, as I see it, is Java's rigidity of boundaries
versus Python's consenting-adults policy. In Java, you write getters
and setters for everything, you lock your class up and make sure
people use it ONLY in the ways you've specified, you declare
parameters/return values/exceptions so people know exactly what to
expect, etc. Python gets out of your way and lets you write a single
application as a concerted whole; if you want to "reach in" and fiddle
with another class's members, go for it. I'm not saying that either
philosophy is *wrong*, of course, but just adding type hints to Python
isn't going to change the underlying philosophical model.

ChrisA

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


Thread

optional types Kiuhnm <gandalf23@mail.com> - 2014-10-29 09:17 -0700
  Re: optional types Peter Otten <__peter__@web.de> - 2014-10-29 17:51 +0100
    Re: optional types Kiuhnm <gandalf23@mail.com> - 2014-10-29 10:18 -0700
      Re: optional types Chris Angelico <rosuav@gmail.com> - 2014-10-30 04:25 +1100
      Re: optional types Ethan Furman <ethan@stoneleaf.us> - 2014-10-29 10:46 -0700
      Re: optional types Chris Angelico <rosuav@gmail.com> - 2014-10-30 05:03 +1100
        Re: optional types Marko Rauhamaa <marko@pacujo.net> - 2014-10-29 20:18 +0200
          Re: optional types Chris Angelico <rosuav@gmail.com> - 2014-10-30 05:43 +1100
          Re: optional types Kiuhnm <gandalf23@mail.com> - 2014-10-29 12:03 -0700
            Re: optional types Marko Rauhamaa <marko@pacujo.net> - 2014-10-29 21:07 +0200
            Re: optional types Kiuhnm <gandalf23@mail.com> - 2014-10-29 12:09 -0700
            Re: optional types Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-10-29 19:22 +0000
              Re: optional types Marko Rauhamaa <marko@pacujo.net> - 2014-10-29 21:44 +0200
                Re: optional types Kiuhnm <gandalf23@mail.com> - 2014-10-29 13:43 -0700
              Re: optional types Kiuhnm <gandalf23@mail.com> - 2014-10-29 13:40 -0700
  Re: optional types Nick Cash <nick.cash@npcinternational.com> - 2014-10-29 16:25 +0000

csiph-web