[Pyrex] Interpreting error messages

Greg Ewing greg at cosc.canterbury.ac.nz
Wed Apr 30 01:32:14 CEST 2003


"Edward C. Jones" <edcjones at erols.com>:

> > I've been thinking about providing an option for requiring all
> > identifiers to be declared. Would you find that helpful?
>
> Yes. So "def Fun(obj)" becomes "def object Fun(object obj)", etc. Then 
> the question is: How does Pyrex differ from a strongly typed extension 
> of Python?

I didn't mean that everything would have to be explicitly
typed, only that (optionally) all identifiers used would have
to be made explicitly known one way or another.

The original problem arose because, in the absence of anything
to indicate otherwise, Pyrex assumed tbat "malloc" and "sprintf"
were Python builtins. If that assumption were removed, you would
have got a message to the effect that they hadn't been declared,
which would have pointed much more directly to the real problem.

It's the only way I can think of to improve the error reporting
in that particular situation. If anyone has a better idea,
I'm open to suggestions...

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+




More information about the Pyrex mailing list