On Saturday, February 17, 2018 at 12:28:29 PM UTC+1, Ben Bacarisse wrote:
> Marko Rauhamaa <ma...@pacujo.net> writes:
> <snip>
> > Many people think static typing is key to high quality. I tend to think
> > the reverse is true: the boilerplate of static typing hampers
> > expressivity so much that, on the net, quality suffers.
> 
> I don't find that with Haskell.  It's statically typed but the types are
> almost always inferred.  If you see an explicit type, it's usually
> because the author thinks it helps explain something.
> 
> (I don't want to start a Haskell/Python thread -- the only point is that
> static typing does not inevitably imply lots of 'boilerplate'.)
> 
> -- 
> Ben.
There are two sides to not declaring types: having readers spend a fraction of 
a second to figure out what types are being used and having tools apply type 
inference for useful purposes. 
Python is bad at type inference (but only because deliberate loopholes like 
eval() are preserved) but good at making programmers trust code, while Haskell 
is bad at encouraging straightforward and understandable types but good at 
extracting maximum value from type inference.  
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to