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: 103376,4afa25b13bea6bcc X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: About a C/C++ to ADA translator Date: 1998/01/05 Message-ID: #1/1 X-Deja-AN: 312981677 References: <34B0C8A6.B19098B6@a01-unix.gsyc.inf.uc3m.es> <68qr3u$m1t@universe.digex.net> X-Complaints-To: usenet@news.nyu.edu X-Trace: news.nyu.edu 884014582 5117 (None) 128.122.140.58 Organization: New York University Newsgroups: comp.lang.ada Date: 1998-01-05T00:00:00+00:00 List-Id: Dave said <<(I hope this was more helpful than Robert's rather acerbic reply) >> The important point in my reply was to discourage trying to learn programming by example. Yes, examples are useful for understanding good style, but they are generally a poor way of learning languages where precision is required. Your (Dave) recommendation to read books is a good one, and consistent with my suggestion. I find that programmers who can only learn by example tend to have a very spotty knowledge of the language, and in particular are least likely to be able to distinguish between the language as defined and the language as implemented. For my own personal tastes I dislike all examples in programming reference manuals, they are either wrong, in which case they are misleading, or redundant, and redundancy is not a good idea in any definition. An example can only tell you one thing that works, it cannot tell you the class of things that work. That's a fundamental weakness. At the same time I realize that a surprising (to me) number of people do find examples helpful. So if you don't know how 2D arrays (or any other feature of Ada) works, then the starting point should be to go read the RM or a textbook, as appropriate to your level of understanding, to find out the rules for how to use 2D arrays. This is a straightforward syntactic matter, and anyone should be able to read BNF fluently who considers themselves a programmer (even if they cannot manage to wade through chapter 3 of the RM :-) Now of course, you sometimes read something and misread, and cannot understand an example of your own that you think is right which gets an error message. (We put in a huge effort to generate good error messages from GNAT, so once again, I take the opportunity to encourage people to submit reports on error messages they find confusing, preferably with suggestions on improvements, don't be afraid to be ambitious in your suggestions, it is surprising sometimes what can be achieved -- e.g. the job that GNAT does in figuring out the semicolon/is mess is quite suprising sometimes). If you are stuck on a specific error message, and cannot figure it out, then that is indeed a good time to post a message to CLA, with exact code and what you saw. If you post a sharp well defined example of this kind, which involves main language features, as opposed to murky things like non-standard rep clauses :-) then you will likely get a pretty immediate response from CLA.