optimizationident

which is the best practice to write keys in any language?


which is the best practice?:

if(1){
    demo();
}

Or

if(1)
{
    demo();
}

And parentesis:

if(1)

Or

if( 1 )

And that one way is better than another?. There are some standard about it?


Solution

  • Your answer will depend on the type of the language you are using, and the type of the program you are writing. Some will be better than others in some situations and others will worse that others in other situations. The best way really, is to use them in different programs and/or languages and learn for yourself which is the best for you. Everyone's answer have their up's and down's, but it is up to you to decide. I hope this helps you!