[Types-sig] type declaration syntax
skaller
skaller@maxtal.com.au
Sat, 18 Dec 1999 15:34:43 +1100
Greg Stein wrote:
>
> On Sat, 18 Dec 1999, skaller wrote:
> >...
> > But the _return_ type doesn't need to be annotated as much.
> > Why? Because the inferencer can usually deduce it:
> > it's an output, the argument types are inputs.
>
> Users of the function need the return type. The inferencer won't be
> global -- it isn't going to look at the function to determine the return
> type.
Viperc _will_ use a global inferencer.
Please don't assume "python" means CPython. There are two other
full scale implementations now. There may be more in the future.
And there may be other programs -- not full interpreters or
compilers, like PyLint -- which will _use_ the information.
> > [I'm not saying if this will kill ":" or lambda though :-]
>
> Heh. I would simply state that lambda cannot be annotated.
OK, agreed.
--
John Skaller, mailto:skaller@maxtal.com.au
10/1 Toxteth Rd Glebe NSW 2037 Australia
homepage: http://www.maxtal.com.au/~skaller
voice: 61-2-9660-0850