[Types-sig] Static typing: Towards closure?
scott
scott@chronis.pobox.com
Thu, 20 Jan 2000 19:43:58 -0500
Another take on the matter: static typing to me seems benefitial
to coding projects that are larger than your average python project.
I wouldn't use it much in scripts or single modules, but I would use
it and benefit greatly once a project is of a scale that requires
thinking about interfaces to begin with. Large projects in python
currently have a feel of a never-ending testing phase to me, primarily
because of the lack of ability to find those errors at compile time.
Regarding the standard library -- I would be much more confident in it
if it were staticly typed, but when I browsed library code, I'd like
to see it non typed, especially if I were just beginning to look at
it and python in general.
Despite this, I do believe that as the syntax gets flushed out and
after several revisions, static typing will actually increase the
readability of code significantly. It's not really there yet, but I
do think it will get there.
scott
On Fri, Jan 21, 2000 at 01:02:24AM +0100, Martijn Faassen wrote:
> Tim Peters wrote:
> [I say def foo: integer is too much like decl foo: integer]
> > Except these don't look like blocks to me at all.
> >
> > def foo:
> > integer
> >
> > looks like a block. That is, a colon that introduces a block is usually the
> > last significant character on a line (always, for people like me).
>
> I write code like that too, but unfortunately not everybody does...
>
> [snip Tim (Yoda?) discussing 'the']
>
> [static types shouldn't be required; 10% extra lines doesn't necessarily
> mean 10% extra effort, type change propagation difficulties causing lots
> of reworking of code]
>
> > premature-static-typing-is-the-root-of-all-evil<wink>-ly
>
> Agreed -- you expressed it better than I could. I don't want to end up
> not daring to change anything, because types could break, and I don't want
> to end up having to engineer complicated interfaces before I can actually
> test them. In C++ (the statically typed language I'm most familiar with)
> you can easily end up in just this situation.
>
> Regards,
>
> Martijn
>
>
> _______________________________________________
> Types-SIG mailing list
> Types-SIG@python.org
> http://www.python.org/mailman/listinfo/types-sig