3 ms·
An alternative to static types are runtime assertions - check that the two arguments to an add function are integers before performing the operation. Then the t
by Dewie 12y ago
An alternative to static types are runtime assertions - check that the two arguments to an add function are integers before performing the operation. Then the type system (strong, dynamic typing) is definitely part of the code of the program, if that's what you want.
> Well, machine instructions are what make the computer do observable things.
The typechecker is a program, and if the typechecker fails, you will see output.
- mtdewcmu 12y agoYou definitely see lots of things like (string? x) even in Lisp. It shows that some types are unavoidable. (Though frequently the type information is just used as additional information.) Typecheckers definitely do things. But are those things interesting?
- Dewie 12y ago> Typecheckers definitely do things. But are those things interesting? That seems like asking "seat belts definitely do things, but are those things interesting?"
- mtdewcmu 12y agoIf you could show that seat belts save lives, which I think you can, then that's kind of interesting. In any case, I meant the question to be rhetorical.