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,50e705cdf2767cc6 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Parser interface design Date: Wed, 20 Apr 2011 10:44:12 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <4deb631f-9d21-4f0f-a5fe-29ae2a9af075@l2g2000prg.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 20 Apr 2011 10:44:12 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="mlmG41Hk0NvblPCVoy/sxg"; logging-data="20061"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19MPfgqjepyERyaX28U1v6mEWYCJ/JW77w=" User-Agent: Pan/0.133 (House of Butterflies) Cancel-Lock: sha1:A2IgomKnpBwoEOoizn0a1grJZ1w= Xref: g2news1.google.com comp.lang.ada:18913 Date: 2011-04-20T10:44:12+00:00 List-Id: On Tue, 19 Apr 2011 05:35:12 -0700, Ludovic Brenta wrote: > Natasha Kerensikova wrote on comp.lang.ada: >>> So what would be the best approach >> From the replies I had, it seems I'm clearly, obviously and deeply >> wrong according to everybody, and yet I can't even begin to understand >> what is wrong and it which way it is wrong. May I please echo the other cries of NO! and add: perhaps the problem was in asking "the best" of something, anything, anywhere. That is usually doomed to failure by drowning in a sea of mutually contradictory opinions... > Also, I do not think this is a language problem. What you can write in > C, you can also write in Ada. ... and probably better, or at least more safely. I believe the approach you first posited was a perfectly viable one, and has the great merit of being one you understand well. I am also learning Ada (though after C and C++ it feels more like healing to me) and typically I'll write mostly what I am familiar with : picking and learning ONE new technique in the process : such as using generics for your callbacks. Best will come in time; meanwhile, I am satisfied with good enough, and learning one step at a time. Hoping not to discourage, - Brian