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: 1014db,6154de2e240de72a X-Google-Attributes: gid1014db,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 From: huang@mnsinc.com (Szu-Wen Huang) Subject: Re: What's the best language to learn? [was Re: Should I learn C or Pascal?] Date: 1996/08/21 Message-ID: <4vdon9$8nt@news1.mnsinc.com>#1/1 X-Deja-AN: 175438199 distribution: inet references: <4v26j4$hkg@news.csus.edu> <01bb8d2f$351b9500$32ee6fce@timhome2> followup-to: comp.edu,comp.lang.ada,comp.lang.c,comp.lang.c++,comp.unix.programmer organization: Monumental Network Systems newsgroups: comp.edu,comp.lang.ada,comp.lang.c,comp.lang.c++,comp.unix.programmer Date: 1996-08-21T00:00:00+00:00 List-Id: Tim Behrendsen (tim@airshields.com) wrote: [snip] : Hmmm... moving a deck of cards around to learn a sorting : technique. Reducing the problem to a very low-level set of : movement operations to help in understanding procedurally : what the computer is doing. Naaah, couldn't work. Much easier : to focus on the high-level C abstraction of the sorting : algorithm. ;-> Lofty, ungraspable concepts like: void swap(int *a, int *b) { int c = *a; *b = *a; *a = c; } ... swap(&a, &b); ... ? swap(), by the way, is a primitive for just about every algorithms text I've ever read. Does knowing the computer must: LOAD r1, a ADD something_else_totally_unrelated LOAD r2, b INC some_counter_from_another_place STOR r1, b INC that_same_counter_but_we_just_need_to_fill_the_slot STOR r2, a in order to swap two integers aid in the understanding of swap()? I agree that we need to break an algorithm down to primitives, but are you actually saying swap(), for instance, isn't primitive enough?