RE: NASL2: precedence of 'logical NOT'
"Jim Cervantes" <[email protected]>
| Newsgroups | gmane.comp.security.nessus.devel |
|---|---|
| Message-ID | <[email protected]> |
I strongly agree with the idea of matching another popular language's precedence (and associativity for that matter). Why do we need another language's precedence rules? > -----Original Message----- > From: [email protected] > [mailto:[email protected]]On Behalf Of Thomas Reinke > Sent: Sunday, February 16, 2003 12:02 PM > To: Nessus Devel > Subject: Re: NASL2: precedence of 'logical NOT' > > > Don't go changing the precedence from the standard ones used > in other programming languages. Standardize on A choice > (be it C, Java, Perl, whatever), and use the same one. It's > alot easier to document and just say "we use language Z's > standard". Sometimes the right choice is not necessarily > the best one (else vi wouldn't live on so long ;-)) > > Thomas > > Michel Arboi wrote: > > "Jim Cervantes" <[email protected]> writes: > > > > > >>I really think you are setting people up to be confused and having > >>to code against their intuition. > > > > > > OK, for the moment, nothing is broken because the NASL1 scripts are > > full of parenthesis but we have to chose something before NASL2 is > > released as "stable". > > > > 1. Change ! so that its precedence is similar to && and || > > (counter-intuitive, different from C and Perl, but rather logical) > > 2. Leave ! as it is and hope that the script writers will put > > parenthesis where needed > > 3. Leave ! as it is and add a low priority "not" operator > > > > After all, that may be a good compromise > > > > >