Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uflorida!novavax!proxftl!twwells!bill From: bill@twwells.uucp (T. William Wells) Newsgroups: comp.lang.c Subject: Re: Assembly or .... Message-ID: <209@twwells.uucp> Date: 27 Nov 88 04:41:46 GMT References: <1388@aucs.UUCP> <6553@csli.STANFORD.EDU> Reply-To: bill@twwells.UUCP (T. William Wells) Organization: None, Ft. Lauderdale Lines: 36 In article <6553@csli.STANFORD.EDU> wagner@arisia.xerox.com (Juergen Wagner) writes: : >In article <1388@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