Strong typing implementation for Python
Bartc
bc at freeuk.com
Mon Oct 12 13:50:54 EDT 2015
On 12/10/2015 18:20, Marko Rauhamaa wrote:
> Bartc <bc at freeuk.com>:
>
>> (Example, calling fib(40) on the example below took 90 seconds on
>> Python 3.4, 11 seconds with PyPy, but only 1.8 seconds running the
>> equivalent with FreeBasic:
>
> I don't know what you need fibonacci numbers for,
It's a benchmark that gives you an idea of how efficient an
implementation is at doing function calls.
> but speed is not the
> essence of most programming tasks.
They've been wasting their time with PyPy then! Everyone likes a bit
more speed. It can mean being able to have a solution all within the
same language.
> Rather, the key issue is managing
> complexity.
(Yes, I've seen gal kauffman's post in this thread. That will need some
managing for sure!)
> As for managing complexity, many people believe static typing is a
> crucial tool. I disagree. Static typing adds vast amounts of noise to
> the code. A dynamic programming language like Python allows you to
> express powerful abstractions concisely, understandably and likely
> correctly.
Static typing gives advantages but it's also nice not to have to bother.
That's why type inference can be useful.
--
Bartc
More information about the Python-list
mailing list