Steven D'Aprano wrote:

"Hoisting" in computing refers to the idea of "lifting" variables or code outside of one block into another.

I'm not sure it's the right term for what's happening here,
though. Nothing is being lifted to a higher level -- the
functions remain at the same level they were written at.

Here's another model: Pascal. Because Pascal does type checking at compile time, it will reject the function ham() and raise a compiler error,

It's more that Pascal is designed to make single-pass
compilation easy. It's possible to support out-of-order
declarations with compile-time type checking using two
passes; Pyrex does this, for example.

--
Greg
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to