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: 1014db,6154de2e240de72a X-Google-Attributes: gid1014db,public From: "Tim Behrendsen" Subject: Re: What's the best language to start with? [was: Re: Should I learn C or Pascal?] Date: 1996/08/09 Message-ID: <01bb8601$a120ef00$87ee6fce@timpent.airshields.com>#1/1 X-Deja-AN: 173157346 references: <01bb73e3.1c6a0060$6bf467ce@dave.iceslimited.com> <1996Jul20.124025.122789@kuhub.cc.ukans.edu> <01bb7b06$311fabc0$87ee6fce@timpent.airshields.com> <31FBC584.4188@ivic.qc.ca> <01bb7da2$6c505ac0$96ee6fcf@timhome2> <01bb8027$de0e9c80$96ee6fcf@timhome2> <4u5a11$siv@mulga.cs.mu.OZ.AU> <01bb8342$88cc6f40$32ee6fcf@timhome2> <4u86lc$2gu@mulga.cs.mu.OZ.AU> <01bb846d$c6c01780$87ee6fce@timpent.airshields.com> <320A65F5.65D9@nicom.com> content-type: text/plain; charset=ISO-8859-1 organization: A-SIS mime-version: 1.0 newsgroups: comp.lang.c,comp.lang.c++,comp.unix.programmer,comp.lang.ada Date: 1996-08-09T00:00:00+00:00 List-Id: Thomas Hood wrote in article <320A65F5.65D9@nicom.com>... > Tim Behrendsen wrote: > > > > or to code than N lines of C. But if you want the students to > > > understand say quicksort, it's a lot easier showing them 20 lines > > > of C than 100 lines of assembler. > > > > Who's talking about showing them? I would suggest that if > > they wrote a quicksort in assembler, they will have a much > > better "feel" for the algorithm, than if they wrote it in C. > > Nonsense. They will have a much better feel for how to shift stuff from > one register to another, but will never realize _why_ they are doing it. > Problem solving in anything but the most trivial of cases is the process > of moving from the specific (the problem at hand, for which we have no > solution) to the general (the algorithmic solution, which fits > the problem domain). Accomplishing this in assembly language is > unnecessary and cruel. Any HOL has the lexical elements necessary to > encapsulate the concept of a quicksort without the agony of dealing with > assembler. Cruel? Agony? Assembly is *not* that hard. > > > Also, we want to get our students into the habit of writing > > > robust and reusable code, and this is very difficult in assembler. > > > At least C has malloc()/free(); with assembler, you need to write > > > the memory management from scratch. > > > > Well, I don't the student has to rewrite all the library > > routines! Nothing precludes you from using them from assembler. > > If you are allowing them to use higher level constructs (abstractions) > to accomplish lower level tasks (solve specific problems), then you > are upholding the very concept you are arguing against! No, I see no reason to have them rewrite the O/S if that's not the purpose of the assignment. They can get input from the library routines, and output using the library routines, but implementation of the algorithm should be done using assembly. -- Tim Behrendsen (tim@airshields.com)