Dag Sverre Seljebotn wrote: > This kind of suggest that rather than trying to take coercion out of > analyse_types and put it after (as we've talked about earlier), it could > be simpler and more natural to rather take the simplest "typing declared > variables" out in a new phase before analyse_types?
I was just thinking about that. The type analysis phase is already doing a simple form of type inference when it works out the result type of an expression from its operand types. Full-blown type inference might be better seen as a generalisation of that rather than separate process. As for separating out coercion, I suppose the type inference phase could just take it on faith that it can treat an operand as though it had a different type if it's convenient, and leave it to a later phase to make it so. Although that might be introducing implicit dependencies between phases of the kind that you really need to avoid if you want to be able to insert new phases without worrying too much about how they interact with each other. -- Greg _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
