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,65cf1c5c90ed694 X-Google-Attributes: gid103376,public From: hymie@panix.com (Hyman Rosen) Subject: Re: Ada vs. C++ (Readability) Date: 1997/09/09 Message-ID: <5v4kie$jp1@panix.com>#1/1 X-Deja-AN: 271178650 References: <341566c7.0@news.uni-ulm.de> Organization: Panix Newsgroups: comp.lang.ada X-Newsposter: trn 4.0-test55 (26 Feb 97) Date: 1997-09-09T00:00:00+00:00 List-Id: In article <341566c7.0@news.uni-ulm.de>, Joerg Rodemann wrote: >However, looking at some examples I was suddenly struck by frustration: >There was some code, that obviously could not work!!! At least that's what >it looked like. Or how would you interpret the lines: > ray x, n; > > x = 1.00, 0.40, -1.00; > n = 0.31, 0.20, 0.93; > >Surely at first glance whatever type x and n will be, x will be assigned >the value 1.00, n will be assigned 0.31. The remaining expression is not >relevant at all from the definition of the colon operator!!! Well, I would interpret the lines the way they look - assigning a three element vector to each of the variables. Do you somehow find this to be unreadable? It looks straightforward to me! The implementation is cute, of course. You forgot that assignment has lower precedence than comma. In function syntax, those lines become x.operator=(1.00).operator,(0.40).operator,(-1.00); n.operator=(0.31).operator,(0.20).operator,(0.93); The comma operator has been prettily redefined to cause concatenation.