3 ms·
> it's too hard to write anything in assembler. And yet, everything you run is written in it. (By a compiler or a JIT, sure.) The goto is a useful abstractio
by asveikau 7y ago
> it's too hard to write anything in assembler.
And yet, everything you run is written in it. (By a compiler or a JIT, sure.) The goto is a useful abstraction for its layer. It doesn't have to be your favorite layer, but it's there, and ubiquitous.
I feel like discussions around memory safety are similar. I can't get a lot of people around here to admit that in order to be blessed with memory safety at one layer it needs to not exist somewhere else, and that's OK.
- AnimalMuppet 7y agoYou seem to be having a different discussion than most of the rest of us. You're claiming that it's fine for its layer, and the rest of us are saying that we don't want to work at that layer. Yes, jmp is useful at the assembly layer. Yes, everything eventually gets run on assembly (on the way to microcode, and then transistors, and then quantum mechanics). That doesn't mean most of us want to work there, though. And goto is the same. Having seen that we don't have to work in that way, we don't want to work in that way. We can work with larger abstractions so that we don't have to deal with that kind of detail.
- asveikau 7y ago> You're claiming that it's fine for its layer, and the rest of us are saying that we don't want to work at that layer. Correct. This is what I said all along. Glad to see you're up to speed. Meanwhile, every time you write an if statement ... May you think, acknowledge, appreciate: "I'm adding a goto!" Or possibly several of them. [I am pretty sure I have had discussions with people who say they are also against if statements, but I don't think that's quite as common.]
- ncmncm 7y agoEveryone is always perfectly and completely aware of the jmp instructions that implement their if and while statements. Talking about them does not make you cleverer than anyone else. What you are missing, and is the fundamental essence of the whole discussion, is that these jmp instructions don't just jump to any old place, like a goto. They jump to only very specific places corresponding to the boundaries of our if and while statements. The compiler will never generate an undisciplined branch, absent an actual goto in the source. Beneath the jmp instructions there are register transfer machines, and beneath them are logic gates, and beneath them are transistors and wires, and beneath them are charge carriers and fields, and beneath those are atoms and crystalline structure. At each level you can find the correspondence with structures in the next level above and below. In no case does the lower level violate the structural rules of the next level up, despite that in principle, it could. That is how we get systems that can be understood, and work.
- asveikau 7y ago> Talking about them does not make you cleverer than anyone else. Please don't assume that any notion of my own cleverness is the crux of what I am saying or has anything to do with it. > At each level you can find the correspondence with structures in the next level above and below. In no case does the lower level violate the structural rules of the next level up, despite that in principle, it could Disagree, especially since you went so far as to talk about the physics. There is a lot of order created from chaos, and the structural rules are largely fiction, taking some effort to impose them.
- ncmncm 7y agoBut they are, in fact, imposed, or you would not be able to read this; thus, fictional only in that they were invented. But in any case, and to the point, there is nothing fundamental about jmp instructions. They, and the sequential execution they interrupt, are a way to help organize state machines. It is a triumph of decades of effort that we have succeeded in making state machines of such complexity behave in comprehensible ways, and a deep failure that we have not found any better way.