+1 for the negate if,
-1 for the simplify expression

----- Original Message ----- 
From: "Dimiter Dimitrov" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 14, 2001 10:13 AM
Subject: RE: [Eap-features] Code Style - parenthesize boolean expressions


> And may be De Morgan transformations of selected statements or DNF/CNF
> normalization of a sellected subexpression. 
> 
> I would also like "Negate IF" which would negate the if condition and
> reverse the if and else clause.
> e.g. I many times find myself converting:
> 
> if (!a && !b) {
>   doSth();
> } else {
>   doSthElse()
> }
> 
> to:
> 
> if (a || b) {
>   doSthElse();
> } else {
>   doSth()
> }
> 
> Dimiter
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Thomas Singer
> Sent: Friday, December 14, 2001 5:57 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [Eap-features] Code Style - parenthesize boolean
> expressions
> 
> 
> I would like to see something like "simplify boolean expressions".
> 
> Example:
> 
> if (!(a == b && c != d)) {
> }
> 
> would be simplified to
> 
> if ((a != b)
>   || (c == d)) {
> }
> 
> Tom
> 
> 
> At 21:21 13.12.01 -0800, you wrote:
> >+1
> >
> >We always try to use this style and not relay on operator precedence.
> >
> >Tal
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED]]On Behalf Of Scott Sirovy
> > > Sent: Thursday, December 13, 2001 7:21 AM
> > > To: '[EMAIL PROTECTED]'
> > > Subject: RE: [Eap-features] Code Style - parenthesize boolean
> > > expressions
> > >
> > >
> > > +1 -- This is another good code layout option.
> > >
> > > -----Original Message-----
> > > From: Per Mellqvist [mailto:[EMAIL PROTECTED]]
> > > Sent: Thu, December 13, 2001 8:44 AM
> > > To: '[EMAIL PROTECTED]'
> > > Subject: [Eap-features] Code Style - parenthesize boolean expressions
> > >
> > >
> > > I'd like an option in the Code Style settings to
> > > insert parentheses in boolean expressions when not present.
> > > Preferably with some added options for when to use spaces
> > > (not in the innermost subexpr).
> > >
> > > The point of course would be to make the code easier to read,
> > > and not have to try to remember all precedence rules to figure
> > > out what goes on.
> > >
> > > A simple example
> > >
> > > if (a != null && !b.equals("") || c != 0) {
> > > }
> > >
> > > would become (I hope:)
> > >
> > > if ( ( (a != null) && (!b.equals("")) ) ||
> > >      (c != 0) ) {
> > > }
> > >
> > > // Per Mellqvist
> > >
> > > --------------------------------------------------
> > > DISCLAIMER
> > > This e-mail, and any attachments thereto, is intended only for use by
> the
> > > addressee(s) named herein and may contain legally privileged and/or
> > > confidential information.  If you are not the intended recipient of this
> > > e-mail, you are hereby notified that any dissemination, distribution or
> > > copying of this e-mail, and any attachments thereto, is strictly
> > > prohibited.
> > > If you have received this e-mail in error, please immediately
> > > notify me and
> > > permanently delete the original and any copy of any e-mail and
> > > any printout
> > > thereof.
> > >
> > > E-mail transmission cannot be guaranteed to be secure or error-free.
> The
> > > sender therefore does not accept liability for any errors or omissions
> in
> > > the contents of this message which arise as a result of e-mail
> > > transmission.
> > >
> > > NOTICE REGARDING PRIVACY AND CONFIDENTIALITY
> > >
> > > Knight Trading Group may, at its discretion, monitor and review
> > > the content
> > > of all e-mail communications.
> > >
> > >
> > > _______________________________________________
> > > Eap-features mailing list
> > > [EMAIL PROTECTED]
> > > http://www.intellij.com/mailman/listinfo/eap-features
> >
> >_______________________________________________
> >Eap-features mailing list
> >[EMAIL PROTECTED]
> >http://www.intellij.com/mailman/listinfo/eap-features
> 
> 
> _______________________________________________
> Eap-features mailing list
> [EMAIL PROTECTED]
> http://www.intellij.com/mailman/listinfo/eap-features
> 
> _______________________________________________
> Eap-features mailing list
> [EMAIL PROTECTED]
> http://www.intellij.com/mailman/listinfo/eap-features

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-features

Reply via email to