Re:Just-In-Time Static Type Checking for Dynamic Languages
by scott_s on Tuesday April 19, 2016 @04:32PM
(#11530106)
Is it catching the type error before executing the code with the type error? The technique presented by the authors does not wait until there's a type mismatch in an individual expression inside of a function. It catches the type mismatch before executing the function. That's what they mean by "just-in-time static". It happens "just-in-time" because it's during program execution, but it's "static" because it happens before executing the function itself.
[ Parent
| on HN ]
Re:Just-In-Time Static Type Checking for Dynamic Languages
by junke on Tuesday April 19, 2016 @04:53PM
(#11530306)
Yes, during compilation.
(defun foo (x) (compile ()
`(lambda (u)
(print "Executed")
(aref ,x u))))
(foo 0)
... reports a compilation error and of course does not print anything. If however I directly type the offending form (aref 0 0) a runtime type error is signaled.
Re:Just-In-Time Static Type Checking for Dynamic Languages
by scott_s on Tuesday April 19, 2016 @04:58PM
(#11530362)
I believe that is still quite different from the technique presented by the authors. Their technique applies at program execution, but prior to the execution of the individual functions. What you're showing is all prior to program execution.
Re:Just-In-Time Static Type Checking for Dynamic Languages
by TeMPOraL on Tuesday April 19, 2016 @07:40PM
(#11531353)
No, this is during program execution. Lisps blend compile time and run time together. You always have a compiler available, so you can compile new stuff (and recompile existing stuff) in the middle of your program's execution. And compile-time typechecking occurs whenever you compile.