Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site mtx5a.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!houxm!whuxl!whuxlm!akgua!akguc!mtunh!mtung!mtunf!mtx5c!mtx5d!mtx5a!mat From: mat@mtx5a.UUCP (m.terribile) Newsgroups: net.lang.c++ Subject: Comments on cfront and lists Message-ID: <1217@mtx5a.UUCP> Date: Wed, 26-Feb-86 03:21:40 EST Article-I.D.: mtx5a.1217 Posted: Wed Feb 26 03:21:40 1986 Date-Received: Fri, 28-Feb-86 22:18:09 EST Distribution: net Organization: AT&T Information Systems, Middletown, NJ 07748-4801. Lines: 47 Hi, A few comments on the recent playing I'm doing with C++. Anyone notice that when playing linked lists, if you stick to member functions, the language strongly encourages the recursive solution over the iterative solution? I may be working in too limited a paradigm, but where one might reasonably write for( ; p ; p = p->next ) something( p ); in old C, when using members, one almost has to write if( p ) { p->something(); xyz( p->next ); } Yes, I know that this is what friends are for, but I haven't got a feeling yet of how much language power is enough, how much is too much, etc. The more I use cfront, the more I come to respect it. The damn thing explains argument mismatches of the doggondest sort. And it's ability to DO things ... inlines, operator definitions, etc, seems phenomenol. Perhaps Algol 68 translators face some of these problems, but how many of them are trying to create production variety code? Anyhow, there are two places where I wish cfront handled errors a little better. First, in writing inlines w/in classes, there is an annoying tendency to forget the `;'' befor the closing brace. The translator I have can trip over itself and take several ``things'' to recover. By the time it does, it's missing some critical type name, and it really gets unhappy. There is probably little that can be done about the typename problem, but is there any chance that the missing semi before a close brace could be handled a little better? -- from Mole End Mark Terribile (scrape .. dig ) mtx5b!mat (Please mail to mtx5b!mat, NOT mtx5a! mat, or to mtx5a!mtx5b!mat) ,.. .,, ,,, ..,***_*.