Michael Lazzaro wrote:
3) If an "untyped" var is used for a typed parameter, a simple dataflow analysis is used to determine whether the compiler can guarantee that, at that point, an "untyped" var will _always_ contain values of a known, specific type. If so, the type is inferred (silently or with a warning, according to pragma?) Otherwise, it is a compile-time error.

I was suggesting something slightly more subtle:


* If the dataflow says its definitely wrong, then its an error

* If the dataflow says its definitely OK, it is OK -- no warning,
  nor error, nor run-time check

* Otherwise (silently or with warning), defer to run-time check

The coercsion aspect makes it slightly more complex, but not significantly so.



Reply via email to