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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,97188312486d4578 X-Google-Attributes: gidfc89c,public X-Google-Thread: 1014db,6154de2e240de72a X-Google-Attributes: gid1014db,public X-Google-Thread: 109fba,baaf5f793d03d420 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,97188312486d4578 X-Google-Attributes: gid103376,public From: henke@hv.se (Henrik Wetterstrom) Subject: Re: What's the best language to start with? [was: Re: Should I learn C or Pascal?] Date: 1996/08/05 Message-ID: <4u5maf$eb2@eken.hv.se>#1/1 X-Deja-AN: 172440047 references: <01bb8027$de0e9c80$96ee6fcf@timhome2> organization: V�xj� university reply-to: henke@hv.se newsgroups: comp.lang.c,comp.lang.c++,comp.unix.programmer,comp.lang.ada Date: 1996-08-05T00:00:00+00:00 List-Id: In article <01bb8027$de0e9c80$96ee6fcf@timhome2>, "Tim Behrendsen" writes: > >Let's try a thought experiment. We take two students; Jane is taught >assembly from day 1 for two years. John is taught C for two years. >Both are exposed to identical curriculums of algorithmic analysis, >data structures, etc. > >Two years later, they switch roles. Who will learn the other's skills >the easiest? I say C will be the most obvious thing in the world to >Jane, and within a few weeks she will out-code John by a longshot. >She will instantly see what subroutines, automatic variables, >static variables, pointers, argument passing, call-by-value v.s. >call-by-reference, arrays, you name it, are all about. She will >already know the concepts; it's just a matter of learning the syntax. >And if she's ever confused, she can always look at the assembly >output. > >John will be hopelessly confused at first, because he will have >absolutely no grounding in what the C syntax really means. He will >have to start completely from scratch. His C syntactical experience >will be almost useless in learning assembly, because the mechanisms >behind the "magic" have been hidden to him. I consider myself as an "instance" of Jane and agree completely. I learned assembler years before any other highlevel language. Ok, when programming in assembler is it hard to ignore C, since many system resources are documented as C structures, so you usually get small parts of C for free when learning assembler. However, the problem comes when you go further. Assume both John and Jane learned both assembler and C. It is time to learn C++ (or any other object oriented langauge). The higher level of abstraction in OO programming is a bit harder for a lowlevel programmer to get used to. Virtual functions, inheritance, garbage collection etc. will take time to learn, but I believe John would learn it faster than Jane. At least that's my own experience. I guess it could be better to learn C++ before C. C programmers who go C++ tend to still program C, but with a few C++ features. Once you are unsecure about the C++, then you go C and eventually end up with one class and 30 functions. Still a good programmer should learn assembler, but when to do it? I don't have a good answer... There's no perfect solution to teaching computer programming. /Henrik