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.4 required=5.0 tests=BAYES_50,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: 103376,97188312486d4578 X-Google-Attributes: gid103376,public From: ajaskey@gnn.com (Andy Askey) Subject: Re: Should I learn C or Pascal? Date: 1996/07/20 Message-ID: <4srb1f$n04@news-e2c.gnn.com>#1/1 X-Deja-AN: 169774373 references: <4sf9e7$kl7@news.jump.net> <4spj1f$prf@news.pacifier.com> <4spkdm$faa@solutions.solon.com> x-gnn-newsserver-posting-date: 20 Jul 1996 19:11:43 GMT organization: GNN newsgroups: comp.lang.c,comp.lang.c++,comp.lang.ada Date: 1996-07-20T00:00:00+00:00 List-Id: jtbell@presby.edu (Jon Bell) wrote: > Peter Seebach wrote: >>This doesn't mean it can't be used well; although C doesn't always help you >>write good code, it certainly doesn't prevent you from doing so. >Agreed. By the same token, it's perfectly possible to design good >programs and write good code in older versions of Fortran or BASIC. But >you have to take a lot more care when doing this; you have to invent your >own "building blocks" for good design, and you have to use them >consistently. Languages with good modularizing features built into them >make this easier. >When someone is beginning to program, it's hard enough already to get >them to use these modularizing features, even when they're built in, >because they require some (gasp!) thought and planning before coding. >When they have to "simulate" these features using lower-level constructs, >it just makes more work for them, and they resist even more strongly. >-- >Jon Bell Presbyterian College >Dept. of Physics and Computer Science Clinton, South Carolina USA >[for beginner's Usenet info, see http://cs1.presby.edu/~jtbell/usenet/] I have found that there are always littlet nuances of algorithm implementation depending on the language choosen. While most well designed algorithms can be implemented in any language, it is not always a 1 to 1 maping when switching languages. If you wish to see the complexity of implementing a C or Fortran algorithm in Ada, take a look at the book "Numerical Recipes in C" (or Fortran). Try porting these routines from one language to another. You can usually do it, but you always can find an neater approach in the different language. So much for the standard languages. If you begin to look at parallel processing on multiple CPUs, then the algorithms are in no way similar. Computing an FFT on a set of data in Ada or C calls for one or more loops of simplistic calculations and data moving. If you write the same code in parallel C on a massively parallel computer with 16,000 processors, then no looping is required. And with PCs moving to multiprocessors as the next great jump of in my den technology, algorithms will become more and more dependent on the language and hardware used. (Kinda like when computers were first discovered -- I believe earth must be the cosmic junk yard of old technology after other beings grow tired with "the next great thing") Oh, by the way, learn C and not Pascal. Everyone will hire a C programmer but I see very few jobs for Pascal gurus. -- May your karma be excellent for forgiving my spelling mishaps. Andy Askey ajaskey@gnn.com