[Types-sig] RFC Comments

Greg Stein gstein@lyra.org
Thu, 30 Dec 1999 10:06:12 -0800 (PST)


On Wed, 29 Dec 1999, Paul Prescod wrote:
>...
> > The reason I chose "!" for argument declarations was that it
> > was already being used in similar way for the _expression_:
> > 
> >         y = x ! t
> > 
> > and in this context, ":" cannot be used.
> 
> Right. My RFC uses a function call syntax inline. It seems more Pythonic
> and can cause no no precedence confusion. It is also compatible with the
> Python 1.5.x grammar.

I've discussed the notion of function call syntax before. It is Not Good.
It causes problems with people believing that an actual function exists
that can be referenced, passed around, etc.  I think that I had a few
other reasons.

If you're going to introduce a new operator, then it should be a new
operator. Not a function call.

> >         OK. You should proceed with _some_ fixed syntax. 
> 
> I used "as" everywhere else. The colon was just a lapse. 

"as" has the wrong semantic.

   x = y as Int

That looks like you want to use y "as an integer". Of course, that isn't
what is happening. You're asserting that y *is* an integer.

Either use "!" or "isa". But definitely do not use "as".

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/