Re:Yes, Python is Slow, and I Don’t Care
by contravariant on Friday September 08, 2017 @09:58AM
(#15200164)
A static type system doesn't protect you from choosing the wrong abstraction, and all the bugs that result from it. But if used properly I think it does help.
Re:Yes, Python is Slow, and I Don’t Care
by traverseda on Friday September 08, 2017 @11:07AM
(#15200751)
How? I don't think I've ever gotten a type I wasn't expecting in any of my python code. It's just not a problem for me.
That is, past the first time I run it. I've been known to pass something an x when it wanted a y, but that's a "fail early, fail loud" bug and not an actual problem.
Re:Yes, Python is Slow, and I Don’t Care
by everheardofc on Friday September 08, 2017 @05:45PM
(#15204172)
Unfortunately in my experience I don't know what type of x I'm supposed pass into to. I either have to guess what x is out of a infinite search space or I have to look at the implementation but unfortunately it also calls some other functions so I need to determine the possible inputs for that function and repeat this until I've read 100s of lines of code just to use a single function because someone thought that documentation is uneccessary and 10 seconds of less typing were worth the tradeoff. Static typing is statically enforced documentation. Sure you might be lucky and already have voluntary documentation available but I am not. I'm getting sick of randomly being stuck for 10 hours on some trivial problem caused by wrong incentives.
Re:Yes, Python is Slow, and I Don’t Care
by contravariant on Friday September 08, 2017 @02:42PM
(#15202900)
This just means that you already have an idea of what kind of object should go where, you just never wrote it down. And because you never wrote it down it becomes hard to generalise things when you eventually want to reuse some method, since you never made explicit which operations an object should support to be able to reuse that method.
Also you have no guarantee that what you think the types should be is actually consistent.
I myself have found this to not be true, and I have found the same in reading / talking to others. However, if you have found a resource that has data on the contrary, I would find it very interesting to read.
https://medium.com/javascript-scene/the-shocking-secret-abou...