News for hackers. Stuff that matters.
Re:Yes, Python is Slow, and I Don’t Care by carlmr on Friday September 08, 2017 @09:46AM (#15200081)
>On the other hand, the idea that dynamic languages are more productive than static languages are laughable. Statically type languages prevent a lot of bugs and allow for a lot of automated provably correct refactorings that simple cannot be done with a statically typed languages. You can't even reliably do a "find usages" of classes using a dynamically typed languag

Exactly, I get quick and precise code completion, I catch plenty of errors beforehand etc. I'd say I'm about 10x as productive in C# as in Python, with similar amount of experience. Python only shines when there is a library that does something really well that you need. For me any productivity advantage in Python is from lots and lots of libraries.

Also in terms of maintainability, I find my C# code easy to read and modify a year later when I've forgotten completely about it. In Python I need to rescan all of the types into my head until I can understand what the program does.

I mean with var and dynamic, C# offers everything you need for duck typing efficiency, while preserving the very important statically typed interfaces.

Re:Yes, Python is Slow, and I Don’t Care by Newtopian on Friday September 08, 2017 @10:11AM (#15200255)
If you annotate your types in python with the appropriate type hinting comments I find I get quite satisfactory code completion and error detection from my IDE (pycharm). Perhaps not as much as VisualStudio might do for me with C#, true, but then again I don't use them for the same thing either.

Each task has it's set or preferred tools, to write a quick command line tool to bridge a gap between two systems and automate our workflow a bit further python is just perfect for me and much more productive than C#. However to create a system with a team of dozens spanning the whole skill gamut I feel much more comfortable having the compiler as an active member of my team policing the architectural vision for us. In which case C#/Java will win hands down.

If however speed and responsiveness are prime worries then I'll roll up my sleeves and bring C/C++ in. sure my productivity will take a hit, it will likely be harder to maintain as well but if this effort makes the difference for my customers in their productivity then it's well worth the investment.

Often times the final system will be a mix of all these technologies, each used where it's strength shines to maximise their impact.

Yet the technology is worthless when faced with inadequate code structure and system architecture. Coupled convoluted code will be a PITA no matter the language used.

Re:Yes, Python is Slow, and I Don’t Care by dogweather on Friday September 08, 2017 @11:34AM (#15200993)
I feel this about Haskell compared to Ruby: Really easy to jump back in to code I set aside months ago.
Re:Yes, Python is Slow, and I Don’t Care by bluntfang on Friday September 08, 2017 @11:14AM (#15200812)
>In Python I need to rescan all of the types into my head until I can understand what the program does.

Couldn't that be solved with sane variable naming conventions and docstrings/documentation?

Re:Yes, Python is Slow, and I Don’t Care by scarface74 on Friday September 08, 2017 @02:12PM (#15202620)
Maybe. But it can be more easily solved on a strongly typed language where you can right click on a method and do "find usages" and it can. E done algorithmically.
Re:Yes, Python is Slow, and I Don’t Care by daemin on Friday September 08, 2017 @09:51AM (#15200102)
Of course that depends how much more you have to write in one language compared to another. Say you're 10x more productive but have to write 5x code, that sort of cuts down the advantage somewhat.
Re:Yes, Python is Slow, and I Don’t Care by AstralStorm on Friday September 08, 2017 @11:56AM (#15201264)
Who cares about writing a lot of code that is boilerplate really?

That is not where productivity sinks are. They're in build systems, package managers, existence of good libraries and ease of debugging as well as limiting number of accidents while coding.

Re:Yes, Python is Slow, and I Don’t Care by barrkel on Friday September 08, 2017 @09:54AM (#15200127)

    dynamic f = x => x * 2;
Duck typing doesn't seem to be offering everything.