From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: *** X-Spam-Status: No, score=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,baaf5f793d03d420 X-Google-Attributes: gid109fba,public X-Google-Thread: fc89c,97188312486d4578 X-Google-Attributes: gidfc89c,public X-Google-Thread: 103376,97188312486d4578 X-Google-Attributes: gid103376,public X-Google-Thread: 10db24,4cf070091283b555 X-Google-Attributes: gid10db24,public X-Google-Thread: 1014db,6154de2e240de72a X-Google-Attributes: gid1014db,public From: "Tim Behrendsen" Subject: Re: What's the best language to learn? [was Re: Should I learn C or Pascal?] Date: 1996/08/17 Message-ID: <01bb8c6d$c62d44c0$87ee6fce@timpent.airshields.com>#1/1 X-Deja-AN: 174770696 references: <4u7hi6$s2b@nntp.seflin.lib.fl.us> <4uo74j$95p@ns.broadvision.com> <01bb8950$2c8dcc60$87ee6fce@timpent.airshields.com> <4ut8h3$2an@ccshst05.uoguelph.ca> content-type: text/plain; charset=ISO-8859-1 organization: A-SIS mime-version: 1.0 newsgroups: comp.edu,comp.lang.ada,comp.lang.c,comp.lang.c++,comp.unix.programmer Date: 1996-08-17T00:00:00+00:00 List-Id: Dan Pop wrote in article ... > In mdw@excessus.demon.co.uk (Mark Wooding) writes: > > > > >I'll admit that I've written assembler code which is almost utterly > >illegible to me now. I've also written some awful C code, so that > >doesn't mean much. However, I have /lots/ more beautiful looking and > >instantly readable assembler code. > > Instantly readable to whom? Definitely not to another assembly programmer > who doesn't know your particular assembly language(s). Well, what sense does that make? C is not instantly readable to someone who only knows Fortran. If you don't know the language, then it's not going to be instantly readable. > >Just because it's low-level stuff doesn't mean it has to be hard to > >understand. Just like any other language, if you take a bit of care to > >present your code nicely, it will be readable; if you don't, it will be > >ghastly. > > Readable or not, it's still a hell to port it to another architecture. > Porting it even to another OS running on the same architecture might > not be exactly a piece of cake. Which is true, but irrelevent to the fact that assembly can be quite maintainable. > Maintaining a piece of assembly code which has been already optimized > for a certain modern processor is also a royal pain in the ass if you > want the result to be still optimal. The days when the only concern > was to get it right from the logical point of view are long gone: if > your assembly code is slower than the compiler output, what is the point > in using assembly in the first place? And the cases when the assembly > code is faster than the compiler output are fewer and fewer and farther > between on the current CISC and RISC architectures. It's extremely rare that hand coded assembly is slower than compiler output. Compilers are *extremely* stupid; anyone who thinks otherwise has either 1) not coded in assembly, and 2) not viewed the assembly output from compilers. They are certainly less stupid than they used to be, but to imagine that on the average they beat even the average human assembly programmer is just nonsense. -- Tim Behrendsen (tim@airshields.com)