RE: NASL2: precedence of 'logical NOT'
"Jim Cervantes" <[email protected]>
| Newsgroups | gmane.comp.security.nessus.devel |
|---|---|
| Message-ID | <[email protected]> |
C sucks in some ways that you have articulated pretty well. That said, it is familiar - I know when to use parentheses, either because C is stupid or my poor brain can't be trusted. And when things go wrong, I know where to look. So, I would rather stick with the familiar. Let's face it, whatever set of rules you choose, the language will work. This is really a practical matter of what will make people most productive. Isn't that what scripting languages are all about - an easy and forgiving learning curve? Anyway, I really do appreciate that NASL2 has emerged with a full-fledged grammar, no matter what the precedence rules! Thanks! Jim > -----Original Message----- > From: [email protected] > [mailto:[email protected]]On Behalf Of Michel Arboi > Sent: Sunday, February 16, 2003 6:32 PM > To: Jim Cervantes > Cc: Nessus Devel > Subject: RE: NASL2: precedence of 'logical NOT' > > > On Sun, 2003-02-16 at 12:20, Jim Cervantes wrote: > > 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? > > Because most of the time, C or Perl try to be a little too smart for my > tired brain. And I cannot trust them fully: > * I have _never_ seen an example of C or Perl code where "x & y == > z" should really behave as it is implemented. > * I cannot see why "x == y == z" or " x < y < z" is authorized in C > or Perl. If somebody needs it, it should be implemented the way it > is in mathematics (i.e. "x < y and y < z" and not some crazy > integer to boolean compare) > * And I am just realizing that we should forbid things like "!!x" or > "~~ x" because they are useless now and may clash with some future > operator (Sorry Renaud! Implementing "!!" is easier than the fish > operator ">(°>" :) > > Anyway I agree that one expects a "compact" operator (I mean, with a > very short name) like "!" to be strongly tied to the next variable. > That's more a problem of readability than logic. > > >