Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!hpl-opus!hpnmdla!hpmwtd!jeffa From: jeffa@hpmwtd.HP.COM (Jeff Aguilera) Newsgroups: comp.lang.c Subject: Re: A question of style Message-ID: <680013@hpmwjaa.HP.COM> Date: 28 Nov 89 00:55:38 GMT References: <1989Nov23.170838.10376@phri.nyu.edu> Organization: HP Microwave Tech. - Santa Rosa, Ca. Lines: 37 > I think the correct word is "wary". My reaction would be "uh-oh -- this > programmer is putting his own convenience and the joys of clever coding > above readability and maintainability -- better treat this code as an > amateur production and not rely on it too much". I guess you would object to this C++ code as well: short recognize::operator()() { if (!head) head=1,activate(); //avoid superfluous activations if (zero) tail=1; //recognize epsilon-transition return tail; } short recognize::operator<<(int n) { if (tail=0,head|body) //turn machine off; scan only if internal states are active if ((this->*scan)(n),head=tail&&many) activate(); //Thompson's construction for Kleene closure return tail; } I'm sure you object to 1) nonintuitive operator overloading 2) proper use of comma expression 3) long lines 4) terse comments, not aligned with tabstops 5) use of = in if () statement 6) avoidance of newlines 7) avoidance of braces 8) individualistic programming styles 9) code that works so well it requires no maintenance (because I have a mathematical modeling proving that it works) ----- jeffa