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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID 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: 1014db,6154de2e240de72a X-Google-Attributes: gid1014db,public From: ken@coho.halcyon.com (Ken Pizzini) Subject: Re: What's the best language to start with? [was: Re: Should I learn C or Pascal?] Date: 1996/08/01 Message-ID: <4tp0bt$b73@news1.halcyon.com>#1/1 X-Deja-AN: 171388505 references: <31FBC584.4188@ivic.qc.ca> <4toc18$4j0@ns3.iamerica.net> organization: What, me? newsgroups: comp.lang.c,comp.lang.c++,comp.unix.programmer,comp.lang.ada Date: 1996-08-01T00:00:00+00:00 List-Id: In article <4toc18$4j0@ns3.iamerica.net>, AJ Musgrove wrote: >In it's purest form, assembly is much simpler than C. Each instruction does >1 and only 1 thing (in general). If someone will spend the "blood, sweat, >and tears" to learn the basics, the rest will come easily. The first >alnguage I was TRULY profienct in was x86 Assembly. Then I went to Pascal, >then C, and I've learned some more since then (but still prefer C for it's >simple elegance). I really didn't grok pointers until I learned assembly. >I also recomend compiled with the "generate assembly" option when a >programmer first starts learning C, so really see what that codes becomes in >assembly. (option is -s on most unix systems). Er, make that "-S"; "-s" strips symbols from the output file. >: Understanding the machine architecture is one thing, using assembly >: languages is another. There's no real interest in knowing all the >: mnemonics of a peculiar assembly language for a C coder: knowing how >: stacks work or how system calls are performed is enough to make efficient >: C programs. >In the military, soldiers are taught how to disassemble guns. >Why? There are people who could do that for them. If one FULLY understands the >tools they are using, one can use them better. Period. I stopped learning the idiosyncracies of various assembly languages after my third, but I still find knowing the general feel of assembly languages in general is useful. Although I no longer work with processors which I can write assembly for, I sometimes find that I need to go to the assembly level during debugging, either because I need to track down a bug in a program whose source I don't have access to, or because I feel that the source-code debugger is obscuring the details of a critical instruction sequence. That said, I would recommend that assembly be taught as language number two. I think that it is useful to learn the general concepts of variables, flow control, and problem decomposition with a language that is at a higher level of abstraction. If it were only more widespread I would suggest the Turing programming language (not to be confused with Turing machines) as a first language: it was designed to minimize the incidence of peripheral errors that beginners would tend to make (such as misplaced semicolon errors in Pascal, runtime detection of the use of uninitialzed variables, etc.). Of the "popular" languages, I think they all have serious flaws when considered as a first programming language. Once the basic concepts are learned, then the choice of a third language depends on external issues, mainly: what kinds of programs will you be writing, and who are you writing them for? While any Turing-complete language can compute anything that is computable, given enough memory and time, different languages really do have different strengths. In the days before Perl I had written some mildly complex sed programs, and maintained even more complex sed programs, but I really would rather not program a compiler in sed, thank you very much ;-). --Ken Pizzini