Assembly or ....

T. William Wells bill at twwells.uucp
Sun Nov 27 14:41:46 AEST 1988


In article <6553 at csli.STANFORD.EDU> wagner at arisia.xerox.com (Juergen Wagner) writes:
: >In article <1388 at aucs.UUCP> Andreas Pikoulas write:
: >>I would like to ask them if it really worth it to spend time to
: >>learn assembly language...

If you don't know at least one assembly language, you are crippled as
a programmer. If you don't know several, of different flavors, you
are, at best, handicapped.  (He said, donning his asbestos
underwear.... :-)

: You shouldn't have to worry about these things. Writing a tail-recursive
: function should be exactly as efficient as the iterative version, provided
: your machine doesn't have more efficient ways to implement recursion...

Ah, you should take into account, before making such statements, that
a compiler can't make *all* optimizations; thus it shouldn't be
expected to. In particular, C being what it is, it would be *stupid*
to assume that your compiler does tail recursion.  (Even though there
is one that does.)

: However, short of writing spaghetti code in assembly language, structured
: code of some kind (lasagne, ravioli, ...) seems to be better because of its
: increased portability, easier debugging, and better maintainablilty.

Might I suggest that you have a misconception about structured
programming?  Structured programming has nothing to do with the
particular language being used. It is perfectly possible to write
structured programs in assembly, though it requires some discipline
to do so. Structured programming is just the arrangement of the
physical structure of the program so that it mirrors its logical
structure. A particular language can make this easier, but no
procedural language makes this impossible.

---
Bill
{uunet|novavax}!proxftl!twwells!bill



More information about the Comp.lang.c mailing list