News for hackers. Stuff that matters.
Re:Why Python is Slow: Looking Under the Hood by zmmmmm on Friday May 09, 2014 @10:02PM (#7724203)
Your only experience with static typing is with Java which has one of the lowest "value for effort" type systems around. Java's type system is mostly bookkeeping and doesn't help you functionally really at all while taking a lot of effort to deal with at the programmer end. By contrast there are much more powerful type systems where the typing takes much less effort AND delivers you actual functional benefits. Crucially Java's generics are not preserved through to runtime, so there is no actually difference between List<Integer> and List<String> to the JVM, only the compiler. If there was a difference all sorts of powerful things could be done with the types at runtime, but as it is it's mostly just the compiler complaining about whether you dotted i's and crossed t's.

I program a lot in Groovy these days, and it now has optional static typing with a limited amount of type inference. What I observe is that I voluntarily prefer to type my variables much of the time because it really does save time and takes only a fraction more effort than leaving them untyped. I find Python quite hard to decipher much of the time because it's nearly impossible to know what type a variable passed into a function is unless you trace back to the caller.

Re:Why Python is Slow: Looking Under the Hood by vorg on Saturday May 10, 2014 @01:43AM (#7724632)
> I program a lot in Groovy these days, and it now has optional static typing with a limited amount of type inference

Groovy has enabled types on variables and functions (and fields and methods) since Groovy 1.0 but that makes the code run slower.

Re:Why Python is Slow: Looking Under the Hood by zmmmmm on Saturday May 10, 2014 @02:31AM (#7724692)
That is not what I am referring to. 2.0 introduced true static typing that compiles to code that not only enforces complete type correctness at compile time (unlike the old option) but executes at near Java speed.