4 ms·
This is totally backwards. Typed programming languages don’t exist, as in at runtime it’s just instructions applied to sequences of bits. A type is just a conve
by mlthoughts2018 8y ago
This is totally backwards. Typed programming languages don’t exist, as in at runtime it’s just instructions applied to sequences of bits. A type is just a convention about an agreed interpretation of those bits. It’s a temporary fiction that doesn’t exist at runtime.
- klodolph 8y agoThere's some inconsistency in that argument. If a type is just a convention about an agreed interpretation of bits, then isn't it equally true that bits are just a convention about an agreed interpretation of voltages, charges, and magnetic domains? But worse yet, voltages, charges, and magnetic domains are just interpretations of the physical world, and they don't really "exist" either...
- mlthoughts2018 8y agoI don’t see what the inconsistency is?
- klodolph 8y agoWe build layers of interpretation on top of one another, and we get this big stack with abstract things like types and programs on the top, bits and bytes somewhere in the middle, voltages and transistors farther down, and fundamental particles at or near the very bottom. We agree that the stuff at the bottom exists, if the word "exists" has any meaning at all. But if you argue that "things which are just conventions about how to interpret other things" (like types) are not real and do not exist, if you want to be consistent about that, the entire stack evaporates and you are left with whatever is at the bottom, such as fundamental particles. For a more concrete example, you said that, "A type is just a convention about an agreed interpretation of those bits." The major problem with this statement is that a program is also an agreed interpretation of some bits. Whether some piece of memory is an instruction or data is just a matter of interpretation. So if this argument says that types do not exist at runtime, then programs do not exist either. So if we accept that programs exist, the argument must be wrong.
- mlthoughts2018 8y ago> “We agree that the stuff at the bottom exists” I don’t understand this part. Where do we agree that? As opposed to those things just continuing to be useful fictions at the boundary between the current best-known reductive explanation of a thing and the outstanding questions where that reductive explanation fails to reproduce observational data as-yet-unexplained?
- klodolph 8y agoI'm not sure exactly what you're saying. The word "where" is a bit confusing, because there are some spatial metaphors here. The final sentence has several subordinate clauses and is quite long, has referents which are quite far from their references, and seems to use the vague word "thing" in two different ways. We agree that there is a physical, objective universe. (Why? We assume it is true because otherwise conversation is not possible.) This physical universe exists (in a physical sense). We also have a catalogue of other phenomena (silicon atom, apple, Kentucky) which we say "exist", phenomena which don't exist (magnetic monopole, dragon, The Shire), and a catalogue of intangible concepts (happiness, vector space, triangle) which don't exist in a physical sense. But every term here, except "the physical universe," are either concepts or interpretations of phenomena. If you say that a data type does not exist because it is nothing more than an interpretation of a physical phenomenon, then my problem with this is that this also applies to computer programs, bits, bytes, silicon atoms, apples, and Kentucky. So I would prefer to use a definition for "exist" that includes data types, bits, bytes, silicon atoms, apples, and Kentucky. I don't think there's a compelling case for drawing a line between data types and bits and saying "bits exist, but data types do not".
- mlthoughts2018 8y agoI think you’re just arguing with yourself here. While pithy, this reply just seems to ignore basically every point I raised and just reassert your original assertions without offering any reason to believe them. In fact I’d say your whole series of comments here are rhetorical gimmick with some bravado like it’s a great philosophical insight while side-stepping the only interesting philosophical question here, which is how do we decide which concepts “actually” exist.
- Tade0 8y agoThe difference with bits is that it's a convention realised in the hardware. 0 and 1 are physically different from each other. A 64-bit float could easily be seen as an array of bytes without any change to the information it contains. Bottom line: types are external to the information something contains.
- klodolph 8y agoWhether a particular voltage represents an 0 or a 1 is an interpretation external to the device. Internally, there are just voltages. Whether a particular voltage represents an 0 or 1 will not in general be consistent, even within a device, and whether a particular piece of the device represents a bit or not is a matter of interpretation. What tells you that a particular location in a chip represents a bit and what voltages correspond to 0 and 1? You have to bring external knowledge of the particular device.
- Tade0 8y agoEntropy. I can measure the number of steady states of the device and discover the actual, real, physical information contained within. Also through this I can discover which voltage corresponds to the high and low state. Meanwhile a series of bytes can be a float, a string, a table of numbers or even a function pointer - you can't tell which without external information.
- klodolph 8y agoIt's a bit frustrating to see a comment that starts with a single, incomprehensible, verbless statement like "entropy." I know what entropy is, and I could give you three different senses for the word, but it's not a particularly illuminating thing to think about here and I'm clueless about how this connects to the rest of the comment. I think what you're doing is taking your existing understanding of how a processor works, and saying that you could figure it out, given an actual processor. But that's begging the question. You have a definition for what a "bit" is, and what a "byte" is, and since you know what they are you can go on a hunt within a physical system and label things as "bit" and "byte". But I could come in and start labeling certain things "function pointer" or "float", and I don't see a particularly compelling reason why that's not allowed, but labeling things as "bit" or "byte" is allowed. Or in other words, why is, "I know how synchronous digital circuits work and I can figure out a processor" acceptable, but "I know how compilers work and I can reverse engineer a program" prohibited? And I'll still say that the statement that, "Typed programming languages don’t exist," is not even wrong. It's just a cute thing that you can say, to demonstrate that you can choose a definition for "exist" or "typed programming languages" that makes it needlessly difficult to have a conversation.
- deleted 8y ago[deleted]
- goto11 8y agoMany languages have type information available at runtime.
- mlthoughts2018 8y agoThis misses the point though. It’s still just instructions applied by convention to bits to tell some other instruction something. When you use “isinstance” at runtime in Python or reflection at runtime in Java, it doesn’t mean the underlying bits somehow “have types” any more than any other function calls or compiled instructions ever would. That’s still just part of the useful fiction.
- goto11 8y agoI guess bits are also a fiction then?
- Retra 8y agoInstructions themselves often encode a conventional interpretation of the bits...