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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7137ee7358078d09 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!m7g2000cwm.googlegroups.com!not-for-mail From: "Martin Krischik" Newsgroups: comp.lang.ada Subject: Re: Basic Explaination of OO in Ada Date: 18 Sep 2006 23:00:12 -0700 Organization: http://groups.google.com Message-ID: <1158645612.319259.291590@m7g2000cwm.googlegroups.com> References: <1158593087.194781.250030@e3g2000cwe.googlegroups.com> NNTP-Posting-Host: 194.41.152.139 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1158645617 19000 127.0.0.1 (19 Sep 2006 06:00:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 19 Sep 2006 06:00:17 +0000 (UTC) In-Reply-To: <1158593087.194781.250030@e3g2000cwe.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.0 fproxy.post.ch:3128 (squid/2.5.STABLE10) Complaints-To: groups-abuse@google.com Injection-Info: m7g2000cwm.googlegroups.com; posting-host=194.41.152.139; posting-account=2-0LkQwAAAAQMhPSoYwlMiUmi-6lYh44 Xref: g2news2.google.com comp.lang.ada:6650 Date: 2006-09-18T23:00:12-07:00 List-Id: richard.charts@gmail.com schrieb: > I'm new to Ada, having to learn it for work, and I am beginning to > understand the language, I think. > However, coming from C (and family) and Java and other "modern" C was invented 1973 and Ada 1983 ;-). > languages, I can't seem to wrap my head around Ada's OO methods. Is it > that there is simply nothing like a class in C++ or Java? See: http://en.wikibooks.org/wiki/Ada_Programming/Object_Orientation > As a learning exercise, I'm trying to convert a simple Python program > to Ada. Well Pythons OO is not best. I won't go into much detatil but encapsulation virtualy does not exist. > The basics of the program were that it took in data about a Person > object(or Student or Advisor) and stored it into array for > manipulation. > At first, I kept trying to convert almost line for line to Ada. But I > couldn't build the classes in the same way. > Is the correct way to think in Ada, that in a package, there is some > record "object" and also a number of subprograms that can interact > with/on that record? That's about it. I allready quoted the relelvant Wikibook link - you find a pretty good explanation there. Martin