Raised This Month: $ Target: $400
 0% 

Code styles - prefered, readability & performance


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 10-30-2016 , 06:13   Re: Code styles - prefered, readability & performance
Reply With Quote #1

For me personally
PHP Code:
condition
{
    
statement
}

if (
x)
{
    
y;

is more readable, however in languages that open blocks with words rather than brackets
PHP Code:
condition open
    statement
close

if x then
    x 
y;
end 
it's better to keep the opening on the same line as condition because
PHP Code:
condition
open
    statement
close

if 
then 
    x 
y
end 
just seems out of place.
__________________

Last edited by hleV; 10-30-2016 at 06:14.
hleV is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode