Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: $Revision: 1.6.2.14 $; site umn-cs.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!stolaf!umn-cs!herndon From: herndon@umn-cs.UUCP Newsgroups: net.lang Subject: Re: structured assembler vs. C Message-ID: <7500005@umn-cs.UUCP> Date: Sun, 16-Feb-86 20:59:00 EST Article-I.D.: umn-cs.7500005 Posted: Sun Feb 16 20:59:00 1986 Date-Received: Tue, 18-Feb-86 03:47:11 EST References: <401@ccivax.UUCP> Lines: 43 Nf-ID: #R:ccivax:-40100:umn-cs:7500005:000:1689 Nf-From: umn-cs!herndon Feb 16 19:59:00 1986 <** Pet Flame On **> Actually, it didn't hasn't always been impossible to construct jump tables in C. In the Good ol' Days before 0 AL (After Lint), the "goto" statement would take any operand as a destination. A label simply had a machine address as a value, and "goto" simply jumped there. Thus one could do things like: foo() { a: bar(a); } bar (x) { goto x; } and blow one's stack out of the water. All kinds of unsavory things were possible, and generally undesirable. Unfortunately, with the coming of "strong typing" (and its concomitant weak ideas), the type label got lost. One cannot type coerce a label to anything else, nor anything else to a label. Very discouraging to those of us who occasionally like to jump to arrays full of machine code (say, for direct interpreters, etc.). Admittedly, these kinds of applications are generally pretty rare, but doing it now requires an array of procedure addresses, and one often has to use an enormous stack if each procedure calls the next. This is may not be desirable if there is no reason to return to the caller, as in tail recursion. It's not optimized in C compilers like it often is in lisp. Having a type "label" for type coercions, like the type "void", would be very useful to me in occasional, rare applications. Oops! Don't get me wrong -- I like strong type typing in practice. It has saved me countless bugs which would have had me stymied for days. However, the "theory" of strong typing as it exists seems very weak. Maybe someday, it will get better, but since it appears closely related to semantic issues, I doubt it. <** Pet Flame Over **> Robert Herndon ...!ihnp4!umn-cs!herndon