doug@terak.UUCP (Doug Pardee) (03/06/85)
> the person at hughes [radar systems] was sad to mention > large portions of their work in still in assembly language due to management > familiarity and pressure. they were just now moving projects into jovial > because young people were taking jobs. Gee, I wouldn't be sad at all to have assembly language programs. I consider high-level language programs to be a major compromise, but one that is often needed because of cost & programming time tradeoffs. High level languages have their place. So do assembly languages. We are making a mistake if we feel that "C" or "Pascal" or "FORTRAN" or "COBOL" or "SNOBOL" or "Jovial" or "assembly" is *THE* language in which *all* programs should be coded. But as a general rule, the reason for *not* using assembly language is because of the initial programming costs. Once the program has already been written and those costs incurred, assembly is almost always superior to higher-level languages. -- Doug Pardee -- Terak Corp. -- !{hao,ihnp4,decvax}!noao!terak!doug
jans@mako.UUCP (Jan Steinman) (03/11/85)
In article <425@terak.UUCP> doug@terak.UUCP (Doug Pardee) writes, quotes: >> the person at hughes [radar systems] was sad to mention large portions of >> their work in still in assembly language due to management familiarity and >> pressure. > >Gee, I wouldn't be sad at all to have assembly language programs... But as a >general rule, the reason for *not* using assembly language is because of the >initial programming costs. Once the program has already been written and >those costs incurred, assembly is almost always superior to higher-level >languages. I love assembly as much as anyone (I'm currently doing about 65k of it for the NS32000), but I don't agree with your blanket statement. Assembly excells in *run-time* ONLY, and the initial programming cost need not be very high, given a good tool chest to start with. What kills assembly is LIFE-CYCLE costs, which include maintenability, (ever try to modify a 1000 line assy program module that has little or no comments?) reliability, ("whadya mean, I'm not supposed to use register a6?") and standards. This last is the worst. I've conducted seminars in SW engineering where half the attendees didn't know the meaning of assy code essentials, such as position-independent, serially- reusable, or reentrant-capable. Ten assy coders will write ten different ways, and none will understand the others' work without a great deal of time and effort. Another way of looking at HLLs is that they enforce a certain set of programming convention upon all users -- not as versatile, not as fast or short at run-time, but life-cycle cost per unit of functionality plummet. With the advent of modern systems programming languages such as Modula-2 and Ada (and grudgingly, C), assembly code has only one place: where run-time space or time considerations are the OVERRIDING concern. -- :::::: Jan Steinman Box 1000, MS 61-161 (w)503/685-2843 :::::: :::::: tektronix!tekecs!jans Wilsonville, OR 97070 (h)503/657-7703 ::::::
bobd@zaphod.UUCP (Bob Dalgleish) (03/11/85)
> > the person at hughes [radar systems] was sad to mention > > large portions of their work in still in assembly language due to management > > familiarity and pressure. they were just now moving projects into jovial > > because young people were taking jobs. > > ... High level languages have their place. So do assembly languages. > > But as a general rule, the reason for *not* using assembly language is > because of the initial programming costs. Once the program has already > been written and those costs incurred, assembly is almost always > superior to higher-level languages. > -- > Doug Pardee -- Terak Corp. -- !{hao,ihnp4,decvax}!noao!terak!doug The reason for *not* using assembly language is the initial programming cost, debugging cost, and when you finally have a running system, and the customer needs new functionality or wants different hardware, the redesign cost, the reprogramming cost, etc. The initial development of a system accounts for only about 30% of its life-cycle cost, the rest is dubbed Maintenance. When you look at costs, you have to look at all of them, including the task facing the designers/programmers that come after you. I have traditionally used about 10% assembler code (yes, it does have a place), mostly where time or space require it. The rest of the code is higher-level, mostly because the higher-level language gives me the leverage I need to accomplish the task. Performance problems are addressed during the design stage when critical timings are identifiable. Sometimes we have to go back and speed things up when performance is below acceptable levels. Performance problems, like bugs occur where you least expect them. If you code everything in assembler (my own experience, remember), you have lost a lot of your flexibility when you have to recode the algorithm, and you also spend a lot of work optimizing things that don't need it. 60% of our code is not executed except during exceptional conditions; it doesn't need to be fast, just correct. -- [The opinions expressed here are only loosely based on the facts] Bob Dalgleish ...!alberta!sask!zaphod!bobd ihnp4! (My company has disclaimed any knowledge of me and whatever I might say)
doug@terak.UUCP (Doug Pardee) (03/15/85)
> What kills assembly is LIFE-CYCLE costs, > which include maintenability, (ever try to modify a 1000 line assy program > module that has little or no comments?) ... No worse than modifying a 1000 line C program module that has little or no comments. And C programs seldom are commented as well as assembly programs. > Ten assy coders will write ten different > ways, and none will understand the others' work without a great deal of time > and effort. Ten C coders will write ten different ways, too. It's a trait of programmers, not the choice of language. > Another way of looking at HLLs is that they enforce a certain set > of programming convention upon all users ... In other words, HLLs allow marginally competent programmers to succeed where they would have failed if they had to deal with assembler. Actually, I agree with that concept, and I even laud it. It means that "otherwise hopeless" turkeys are able to do the drudge programming like mailing-label programs, leaving me free to work on interesting stuff. > assembly code has only one place: where run-time > space or time considerations are the OVERRIDING concern. Agreed. If only more people recognized that there are indeed programs for which space and time considerations *are* an overriding concern... > Nobody has mentioned portability -- maybe that's become a non-issue? -- Doug Pardee -- Terak Corp. -- !{hao,ihnp4,decvax}!noao!terak!doug
eric@apollo.uucp (Eric Peters) (03/15/85)
> But as a general rule, the reason for *not* using assembly language is > because of the initial programming costs. Once the program has already > been written and those costs incurred, assembly is almost always > superior to higher-level languages. Sorry, but I beg to differ: The initial programming costs are nothing next to the costs of keeping a program alive and useful. There seems to be a myth out there that "real" programs are written, and then no one ever looks at them again (the "dusty decks" hypothesis). In fact, the real world changes so fast that few working programs can stand still for long -- even if they have no bugs. I do happen to believe that assembly language has its uses; but more often than not, a high level language will result in a better solution over the life of a program. It will track the real world. And I'll only barely mention that high level language programs can start out better, simply because the programmer didn't have to spend so much of his valuable time worrying about the machine he is coding, so he spent more time worrying about the application. And I won't even mention portability at all. :-) So I guess "superior" really reflects the value system you're using. Eric Peters (...decvax!wanginst!apollo!eric) Apollo Computer Inc., Chelmsford, MA 01824