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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a9b0810d3106d9b8 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!d19g2000prh.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Elias_Salom=E3o_Helou_Neto?= Newsgroups: comp.lang.ada Subject: Re: Fun with C Date: Thu, 21 Apr 2011 09:19:08 -0700 (PDT) Organization: http://groups.google.com Message-ID: <4b5748dc-60fa-4cec-a317-054626e9a1ca@d19g2000prh.googlegroups.com> References: <27cf3992-4132-4483-9110-adc7a089cd4a@e8g2000vbz.googlegroups.com> <3ccf18a2-ba10-42bc-aeab-9368749961fb@a11g2000pro.googlegroups.com> <4c2b6a58-e3b6-47da-95e0-64853be5c1f9@v11g2000prb.googlegroups.com> <86748003-860f-4729-ae26-55be1e58ac2b@d27g2000vbz.googlegroups.com> NNTP-Posting-Host: 186.223.216.44 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1303402754 2125 127.0.0.1 (21 Apr 2011 16:19:14 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 21 Apr 2011 16:19:14 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d19g2000prh.googlegroups.com; posting-host=186.223.216.44; posting-account=8auP9QoAAACkSx2qxJhP83KA6-tg78E8 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.8 SUSE/7.0.528.0 (KHTML, like Gecko) Chrome/7.0.528.0 Safari/534.8,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:18952 Date: 2011-04-21T09:19:08-07:00 List-Id: > We're not talking about C specifically, we're talking about "a new > language". New to the programmer or to the world? If it is the former, I still recommend a book. A textbook will take you from the basics to the more advanced features of the language. This is the way to learn. By skipping the first steps people simply won't know the most basic stuff, such as C's type promotions. Instead, people like to program by "trial and error". Which will rarely, if ever, work. > > >> We wrote a partial Ada *compiler* back in > >> 1980 from a description circulated by our professor (Janus/Ada originally > >> started in a compiler construction course). > > >Surely the first Ada compiler you wrote wasn't coded in Ada itself. > >Haven't you read any book about the language used to code the compiler > >before? > > Sure, but irrelevant, since we had to create test programs for the compiler > in Ada (gotta test that it works), and that requires some understanding of > the language. Not at all irrelevant. Test programs are not real-life programs, while a compiler surely is. Furthermore, the language description you had from your professor had to be deeply studied in order to get the compiler working. So you've had to learn from the most basic to the most advanced feature of the language. > Depends on what you meant by "good book". A raw language description (as in > the professor's handful of mimographed sheets) or even the Ada Reference > Manual doesn't seem to be a "good book" about programming in the language. I > had presumed that you meant "textbook" when you said "book". Ok. > Go back and re-read the statement that you made: "...but not without a good > book to read while practicing.". I disagree with this statement as written, > and I explained why. I also didn't feel any need to insult you when > disagreeing with you, which does not help your point any. Did I insult you? Sorry if I did. But I keep the reasoning: go and read a book before programming. One that progressively goes from the basic to the advanced features in a reasonable way. You are a talented programmer and learned Ada from a description. But you did not start to write random code in Ada. You had a solid foundation on it because you had to be precise when writing the compiler. I am sure you will notice how different it is from just "starting coding and making it compile". > These days, I hardly expect anyone to expect requiring a "book" to do > anything. Even counting "e-books" as "books", there are a lot of information > sources which have nothing to do with "books". It was a lot harder to > understand back in 1981, yet it still happened then (and even then there > were a lot of information sources having nothing to do with books - papers, > magazine articles, seminars, lectures, computer-aided-instruction). I still do not recommend any of those as means for a beginner to learn a language: papers are not for beginners; magazine articles are too vague or too specific; seminars are usually too short to be of any use for beginners and they are, decause of being short, focused on a too narrow or too vague subject; lectures are good, but good lecturers will likely indicate a bibliography, which will include textbooks if it is intended to beginners. Perhaps computer-aided-instruction, but I haven't seen it in use, so I do not recommend it. Remember, I am a professor. I do lecture and present seminars. And no, seminars won't teach you how to program. Neither will the lectures, unless followed by laboratory classes and homeworks, which should be done alongside a good book on the subject. Honestly, I do not like students taking notes of my lectures, they should be paying attention and latter they should use the recommended book as a reference. Unless I've explicitly stated otherwise. > >After writing an Ada compiler it is very unlikely for someone not to > >know the language. There are lots of C textbooks, why not to use them? > >Nonsense. > > We're not talking about C specifically, we're talking about "a new language" > in general. I don't get it. Which new language may someone want to learn for which there is no good textbook available? Again, do you mean "new to the programmer" or "new to the world"? > And I doubt I would *buy* a textbook these days; pretty much everything one > needs is on-line (and often not in the form of a book!). Even though there is plenty information on the internet, books are still worth buying, I am sure of that. You can't (legally) find the really good textbooks on-line neither you can find anything comparable to those textbooks. Good information still has its price. As a test, find me a replacement for "C++ Primer" on-line. > >Also, please notice that I've recommended a book for those that are > >learning the language, not for those who have already mastered it (but > >even so a good reference manual is invaluable). > > Again, I don't give a hose about C; I see no reason to waste my time with > obscure language wars. (Ada is best, and that's it. :-) It is true that I said "learning _the_ language" and that it referred to C, but it surely applies to any language. > Maybe *you* have to fight it. I happen to think that a language that is > unnecessarily different than what a typical programmer would expect is > dangerous. (And yes, Ada suffers from this in a few places as well -- and > those things are also dangerous.) Ops. I think you're wrong here. Programming languages _must_ be different from each other, otherwise there would not be reason for so many to exist. And some new, useful, paradigms appear that can't be natural to any programmer simply because it did not exist before its invention! > I don't claim to know C (anymore), but that doesn't prevent me from hating > it. :-) I did not mean that you claim to do so, but that other did when they should not. > I realize this is somewhat irrational, which is why I try to stay out of > language wars -- there is no way to win (I'm more likely to marry a > supermodel than I am to change my mind about C! :-) I am not quite into language wars too. I have never advocated one language over another, just look at my posts above. So, forget C and good luck in marrying a supermodel. When it happens, if she has any friends, please introduce me to them :-) Elias