[Compiler-sig] dipping my toe in...

Finn Bock bckfnn@worldonline.dk
Tue, 16 Apr 2002 15:49:46 GMT


On Tue, 16 Apr 2002 09:55:59 -0500, you wrote:

>
>              -- 'type' is a bad name
>              | Raise(expr? type, expr? inst, expr? tback)
>
>How about "exc" instead?
>
>Does the "?" imply the preceeding fields must be present if that is?  For
>example, if we have an "inst", does that imply we also have a "type" the
>same way optional args work in Python?'

No, asdl cannot capture that requirement in its syntax.

Since we are controlling the codegeneration, we could decided to
interpret the '?' the same way as optional args, but we would get some
trouble with the lower/upper bounds in Slice and with the
starargs/kwargs where both can optional.

For easier mapping into java, I would prefer if we only used positional
arguments but if we want them bad enough, I can also add support for
keyword args to the ctors.

regards,
finn