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


Groups > comp.lang.python > #18705

Re: python philosophical question - strong vs duck typing

From Robert Kern <robert.kern@gmail.com>
Subject Re: python philosophical question - strong vs duck typing
Date 2012-01-09 10:45 +0000
References <CAOFf2a0dG1tR1-2sJnqCCGqVXocqvzGScGeDJXeXwKdfdvuT-Q@mail.gmail.com> <mailman.4383.1325623116.27778.python-list@python.org> <59305aab-7ddf-4c61-b8ba-025a2ce10b48@d10g2000vbh.googlegroups.com> <4f0a7ca9$0$1727$742ec2ed@news.sonic.net>
Newsgroups comp.lang.python
Message-ID <mailman.4546.1326105918.27778.python-list@python.org> (permalink)

Show all headers | View raw


On 1/9/12 5:35 AM, John Nagle wrote:

> Python has some serious problems that preclude optimization.
> Basically, the language is designed to be run by a naive (non-optimizing)
> interpreter, and allows things that are easy
> for such an implementation but very tough to optimize. An
> example is the ability to store into the variables of a module
> from outside it, and even from another thread. Every attempt
> to get rid of the Global Interpreter Lock has hit that problem.

You keep repeating this falsehood about the GIL. You have been repeatedly shown 
that this is false[1][2], though I have yet to see you acknowledge it. The GIL 
exists to protect Python's internal data structures, mostly the reference counts 
on objects. The reason that the attempts to remove the GIL from CPython have not 
been accepted is because they cause unacceptable performance losses in the 
common unthreaded case. In implementations of Python that do not use reference 
counting, there is no GIL. Neither Jython nor IronPython have a GIL, but they 
both have the standard Python semantics that let you store variables into 
modules from the outside, even from other threads.

[1] http://mail.python.org/pipermail/python-list/2011-February/1265760.html
[2] http://mail.python.org/pipermail/python-list/2011-April/1269056.html

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

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


Thread

Re: python philosophical question - strong vs duck typing Terry Reedy <tjreedy@udel.edu> - 2012-01-03 15:38 -0500
  Re: python philosophical question - strong vs duck typing Ben Finney <ben+python@benfinney.id.au> - 2012-01-04 10:10 +1100
  Re: python philosophical question - strong vs duck typing alex23 <wuwei23@gmail.com> - 2012-01-03 18:15 -0800
    Re: python philosophical question - strong vs duck typing John Nagle <nagle@animats.com> - 2012-01-08 21:35 -0800
      Re: python philosophical question - strong vs duck typing Robert Kern <robert.kern@gmail.com> - 2012-01-09 10:45 +0000
        Re: python philosophical question - strong vs duck typing John Nagle <nagle@animats.com> - 2012-01-13 09:30 -0800
      Re: python philosophical question - strong vs duck typing Lie Ryan <lie.1296@gmail.com> - 2012-01-11 00:05 +1100

csiph-web