News for hackers. Stuff that matters.
Re:Yes, Python is Slow, and I Don’t Care by ageofwant on Friday September 08, 2017 @09:23AM (#15199951)
You only pay the the price while debugging. In your static language you pay the price continually. You are wasting orders of magnitude more time fighting your language's type system every day, you have to read reams of boilerplate code that are unrelated to the problem at hand, each extra line increases the attack surface and complexity of your code.
Re:Yes, Python is Slow, and I Don’t Care by carlmr on Friday September 08, 2017 @09:55AM (#15200138)
>You are wasting orders of magnitude more time fighting your language's type system every day

I program C# a lot, I never fight the type system. It helps me. It tells me while coding that something is wrong. In Python I'll catch this as well...eventually, when I run the code. A type error in C# would be a runtime error in Python. That's very inconvenient.

The static types are also documentation showing intent. It's hard to read old dynamically typed code bases, because I have to do the type processing in my head to understand what is what. Much simpler if I have nicely defined interfaces.

Re:Yes, Python is Slow, and I Don’t Care by cup-of-tea on Friday September 08, 2017 @10:55AM (#15200639)
When I write a new function in Python I immediately evaluate it in a running REPL and test it. There's no eventually about it. A function either works or it doesn't.
Re:Yes, Python is Slow, and I Don’t Care by christophilus on Friday September 08, 2017 @09:33AM (#15200001)
Having worked in both dynamic and statically typed systems, I don't think this is true. A good statically typed language doesn't get in your way very often, and it doesn't produce any more boilerplate than doc comments do in dynamic languages. You do write doc comments, right?

In fact, I'd say that most of the time, a good statically typed language does the opposite of get in your way. It helps you w/ refactoring tools, better intellisense and editor help, self-documentation, etc. The older a codebase gets, the more helpful a static type system is.

That said, there are statically typed languages which produce a ton of boilerplate (Java used to, at least), and there are those that don't (F# comes to mind).

The only dynamically typed language I've used where I didn't regularly miss static typing is Clojure. (Elixir may fit the bill, but the jury's still out on that.)

Re:Yes, Python is Slow, and I Don’t Care by asah on Friday September 08, 2017 @09:38AM (#15200030)
This.

Let me add a radical point: static typing is often thrown out anyway, when you encode your data as strings, serialize/marshal it, create polymorphic lists and hierarchical data structures, etc etc

Meanwhile, disciplined use of python is perfectly easy to get right: - use pylint - be ruthlessly consistent in naming classes, methods and variables (which pylint helps btw,) - for large projects, consider mypy etc

Re:Yes, Python is Slow, and I Don’t Care by contravariant on Friday September 08, 2017 @09:56AM (#15200147)
If you're working in a statically typed language and cast everything to string / object you deserve all the bugs you get.