Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My 2c: I think the point is that types themselves are just syntax. It's all bits at the lowest level, so there's really no such thing as a 'type' on a Turing Machine tape. It can be expressed syntactically on the tape, but that's the point.


But what's the difference between this type syntax on the tape and the number 2 on the tape, which is presumably something other than "just syntax"?

This gets especially confusing when you bring in dispatch, where the types are now deciding what functions get called.


Pierce is specifically excluding dynamic typing from his definition. He goes on to address this point in the introduction to the book:

> The word "static" is sometimes added explicitly—we speak of a "statically typed programming language," for example—to distinguish the sorts of compile-time analyses we are considering here from the dynamic or latent typing found in languages such as Scheme, where run-time type tags are used to distinguish different kinds of structures in the heap. Terms like "dynamically typed" are arguably misnomers and should probably be replaced by "dynamically checked," but the usage is standard.

A static type system is syntactic insofar as the syntax itself is what is being analyzed, not the actual runtime behavior.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: