News for hackers. Stuff that matters.
Re:Type checking in Python by artursapek on Sunday May 18, 2014 @09:20AM (#7762973)
This is neat, but why not just use Go!
Re:Type checking in Python by skj on Sunday May 18, 2014 @09:34AM (#7763017)
I am an avid gopher, but this is not a useful response. Believe it or not, there are many places and reasons where Python works out better than Go, and making it a bit easier to use Python in those situations is valuable.
Re:Type checking in Python by yen223 on Sunday May 18, 2014 @10:38AM (#7763184)
You're getting downvoted, but I think you have a point. Any attempts to enact type-checking in a language that doesn't require it is doomed to failure. You'll get all the safety of a dynamic language, with the flexibility of a typed language.
Re:Type checking in Python by frowaway001 on Monday May 19, 2014 @07:38AM (#7766931)
> You'll get all the safety of a dynamic language, with the flexibility of a typed language.

That sounds a pretty good description of Go, so I'm wondering what his point is in the first place.

Re:Type checking in Python by pekk on Sunday May 18, 2014 @09:35AM (#7763021)
Go is neat, but why not just use Haskell? (etc.)
Re:Type checking in Python by raverbashing on Sunday May 18, 2014 @12:10PM (#7763416)
Monads

Or more specifically, how non-intuitive it is to use the IO stuff

I don't care what it uses, or what is it called, I care about being able to use it with what I know

So yeah, I'll go for Go instead of Haskell

Re:Type checking in Python by Peaker on Monday May 19, 2014 @03:25AM (#7766142)
The IO stuff has almost nothing to do with monads.

It is unfamiliar, but if you use static typing, at least reap the benefits of better error checking, no runtime null dereferences, etc.

Re:Type checking in Python by frowaway001 on Monday May 19, 2014 @07:40AM (#7766936)
Yeah, because why would we ever need the compiler to help us identifying operations which make it harder to reason about our programs!
Re:Type checking in Python by clubhi on Sunday May 18, 2014 @10:16AM (#7763120)
Haskell is ok, but you should check out the dynamic nature of Python
Re:Type checking in Python by jbeja on Sunday May 18, 2014 @10:24AM (#7763144)
I think that the dynamic nature of python is why some folks prefer haskell over it.
Re:Type checking in Python by clubhi on Wednesday May 28, 2014 @12:14AM (#7808370)
yeah, that was my joke... no one got it. basically I'm talking about the never ending hunt for a perfect language
Re:Type checking in Python by coldtea on Sunday May 18, 2014 @01:42PM (#7763685)
Well, not that many. So that settles it then.
Re:Type checking in Python by jbeja on Sunday May 18, 2014 @02:53PM (#7763915)
That is why i said some.
Re:Type checking in Python by Dewie on Sunday May 18, 2014 @02:31PM (#7763838)
You should check out the dynamic nature of Typeable.

"The module Data.Dynamic uses Typeable for an implementation of dynamics."

http://hackage.haskell.org/package/base-4.7.0.0/docs/Data-Ty...

Re:Type checking in Python by uniclaude on Sunday May 18, 2014 @10:04AM (#7763085)
The case of a large, already existing Python codebase comes to mind.
Re:Type checking in Python by smnrchrds on Sunday May 18, 2014 @11:16AM (#7763278)
You make Python sound like FORTRAN. :)
Re:Type checking in Python by ant_sz on Sunday May 18, 2014 @11:50AM (#7763360)
err...It's a tradeoff.

I think when the first dynamic programing language was invented, the loose typing system must be thought as a big advantage.

Type checking is necessary in some cases, but I really enjoy dynamic typing a lot. So I think a bit tradeoff like this is acceptable. After all, we have to tradeoff everywhere when it comes to computer science such as the time-space tradeoff of an algorithm.

Re:Type checking in Python by Peaker on Monday May 19, 2014 @03:27AM (#7766150)
I think people who enjoy dynamic typing have had bad experiences with bad static type systems earlier (C, C++, Java).

Once you use a good static type system (ML, OCaml, Haskell) you see that dynamic typing isn't responsible for the joy, but the ability to express rich ideas without repeating redundant type declarations.

Re:Type checking in Python by hcarvalhoalves on Sunday May 18, 2014 @01:35PM (#7763653)
I would like to know why in every post about Python on HN there's someone shouting "just use Go"!
Re:Type checking in Python by Dewie on Sunday May 18, 2014 @03:59PM (#7764171)
It seems like quite a few people who are used to dynamic languages have found out that static typing and verbosity aren't strictly synonyms by using Go.
Re:Type checking in Python by _random_ on Sunday May 18, 2014 @11:17AM (#7763281)
Static-typed languages are not very good for scripting and "gluing" systems.