3 ms·
GOTO and weird optimization may be very useful in some circumstances but there's a case where they'll never be desirable: security. I'm 100% that the future se
by martinced 14y ago
GOTO and weird optimization may be very useful in some circumstances but there's a case where they'll never be desirable: security.
I'm 100% that the future security-wise is stuff like esL4 (the L4 micro-kernel, but which has been formally verified to be free from a lot of common mistakes typically leading to security exploits).
So before criticizing things as "toys" because they have don't have goto etc. you have to realize that there are ends (security) that do justify quite some means.
And don't get me wrong: I've done my faire share of 680x0 and 80x86 assembly coding and just loved to be "in control" of everything. It gave me a sensation of power.
But now I much prefer to look far ahead and dream about the days where we'll be able to use provers on not just micro-kernels that are 7000 lines long (and already on such a trivial number of lines already find hundreds of potential security exploits which have all been fixed) but also use provers on much bigger programs.
So saying: "I want to be able to modify a lookup table by accessing two bytes as if they were a 16-bit word so that on the next pass I'll automagically JMP to this place" (I'm just making that up) is, IMHO, a bit shortsighted when considering the real problems we face today.
Most people have way enough power and totally underused computers (often with many cores idling). The problem is hardly CPU perfs.
I'm not trading security for performance.
- gngeal 14y agoYou don't have to verify the code with gotos, you have to verify the translator. After all, if you were serious about this, you'd have to stop using most computers since they do actually run programs with JMPs in in.
- sedachv 14y agoMonads are basically continuations are basically GOTOs. If you have a useful type system (like Haskell, not like Java), you get the formal verification of correctness done for free by your type checker.