|
|
|
|
|
by _flux
20 days ago
|
|
There's a school of thought that consider the term "types" reflect to the properties that exist in programs even before they are run, as in they are a property of the programs themselves, not their state at runtime. This thinking—which is also what type theory talks about—does consider Python untyped: reading a Python program along with its specification, you are not able to assign types to each expression. But what Python does have is tagging: when you create an object you tag it, and then whenever you operate on those values, you check the tag and maybe raise an exception or not. This is happening at runtime. Strongly typed and weakly typed do not seem to have good definitions. A good one I've read is that "strong typing describes the typing you like". It is great though if people go to the same extent as you to define what they are talking about, as this reduces the chances of misunderstandings. But it should not be taken as fact that the definitions you have chosen are the universally accepted ones. |
|
Is strongly typed not “I compiler/runtime guarantee the bytes I read adhere to type T”?