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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: troubles learning OOP: expected type "Parent.Some_Child", found type Parent'Class Date: Mon, 12 Feb 2018 22:40:52 +0000 Organization: A noiseless patient Spider Message-ID: References: <634e9064-33f8-42c0-9032-e630f98c89d4@googlegroups.com> <982639bc-8e7e-4c43-a1ff-cf9fa7c0d0ed@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="b6495a8dbc2779c7727059ea44b5e007"; logging-data="21452"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ef8IixwHRq/PS3Qm2F5YR6V4XGuuk19o=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:viyOEj0uxnYBH7GWKq8t1jL9t6o= sha1:11Jsc/MF3XEorso+t++MTpBVr5U= Xref: reader02.eternal-september.org comp.lang.ada:50403 Date: 2018-02-12T22:40:52+00:00 List-Id: Mehdi Saada <00120260a@gmail.com> writes: > But I'm surprised there's no mechanism in the language, to tell the > program: HEY there ! I'm sure it's T_TOKEN_OPERANDE, so now consider > TOKEN as such and let me reach it's OPERANDE component. There is: T_Token_Operande (Token).Operande But it's much easier to tell the Token to do something, and have it respond appropriately, than it is to access its internals, which as you say will be different.