[Types-sig] New syntax?
Greg Stein
gstein@lyra.org
Thu, 16 Dec 1999 15:11:27 -0800 (PST)
On Thu, 16 Dec 1999, Martijn Faassen wrote:
>...
> > [ I *really* don't like member declarations in the __init__() method as
> > some people have shown. Those could be confused with declarations of
> > local vars, which I hope we aren't going to have. ]
>
> Well, my syntax proposal avoids this confusion by following Python's
> lead:
>
> varclass Foo:
> alpha: int
>
> def __init__(self):
> self.member: int
> local: int
Quite true. This is much clearer. But I still want "decl" rather than
"varclass" :-)
> > Consider the above example, my latest proposal for syntax changes in
> > support of declarations. Obviously, a bit more detail is needed for things
> > like parameterized types, but I think the above is representative of where
> > I'd like to see things go.
>
> Didn't you think parameterized types looked fairly straightforward in my
> syntax proposal?
Yes. I would expect something like that for a new typedecl syntax.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/