Well, Jow Forums?
Well, Jow Forums?
if (conditional) {}
fuck trannies
God I wish that were me.
imagine boosting your line count by putting all opening brackets on their own line
Follow the conventions of the language you are using.
/thread
Opening brackets on separate lines is a surefire way to identify pajeet code. You're supposed to trail the closing bracket upwards to find the corresponding method, some compilers even come with guiding-lines that make this abundantly clear
Pajeet code has this weird fucking convention of separate line, but indented to the level of the conditional body.
So Whitesmith's style? Speaks volumes it completely originates from the manual of the first commercial C compiler and some MS Windows programming books.
Doesn't matter, but anyone who uses any of these styles deserve death to be quite honest famalamadingdong
literally nothing wrong with lisp style brackets
I could point out 4 things extremely wrong with Lisp style brackets
Gay
Normally I use Horstmann style unless there's only one line in the conditional, then i just put the whole thing on one line.
Unless you're working on your own project, or for a shitty startup, you don't get to decide.
You follow company standards.
What if company standards are like
Just clang-format
>language your are using
*project you are working on
whatever the eslint config tells me to use :^(
if it's good enough for the linux kernel, it's good enough for me
function ( )
{
if ( ) {
. . .
} else {
. . .
}
}
>project you are working on
*however you feel at the time
>using standards from the 1980s
It's called progress user, the same way as Shakespeare's language was perfectly good for his era, it's now outdated for us.
There's only one correct answer
if(){
}
>it's now outdated for us.
funny, because the language has regressed since then.
>ALL CHANGE PROGRESS
can't fix what isn't broken
Do it then.
still studied in modern english classes tho
(if
)
>drinking from a plastic container
no wonder the penis has boobs now
while (
x == y ) {
something();
somethingElse(); }
if (conditional) {
}
else if (conditional2) {
}
else {
}
>
while
(x == y
) { something()
; somethingElse()
;}
I prefer less typing
if(){
}
if(){
}
looks like shit stop using it
if()
{
}
else if()
{
}
else
{
}
K&R because fast
if 'condition' == 'true' then
...
end
Sorry, I don't program in bad languages :)
The your language's interpreter is written on a bad language.
*the team you are working with.
someone call an ambulance user's having an aneurysm
Just pointing out that most languages have their use cases, and python is not the thing you write compilers with.
Correct style right here.
while (x==y)
{
something();
somethingelse();
}
that was a good manga, its a shame only around 10 chapters were translated
Sauce?
If (conditional)
{
Body; }
>doesn't even list
if(cond){
statement;
}
how can one list be so incomplete yet so long
if (conditional) {
something();
somethingelse(); }
if (thing) { one liners }
if (thing) {
this
way
otherwise
}
K&R is where its at
explain this to me, not a nerd or weebaloo.
Then why are you on the technology section of an anime website?
I really thing you should leave.
inly subhumans use if statements, real men use conditional operator
>not a nerd or weebaloo.
-- Jow Forums Jow Forums poster, 2019.
"what happened?" -- LGR
t. lazy ass nigga
Correct
are you lost?
ikinokore! shachiku-chan
if (
conditional
){
//code
}
very cute
if condition then
stuff
>using a language with braces in 2019
>significant whitespace
condition and do_something()
Same-line brackets is just autism trying to make everything as condensed as possible. I tend to use
>Next line brackets
>Single space after variable declaration
>Double space between function declarations
nobody needs semicolons with a healthy abuse of the comma operator either
if (conditional) {
foo();
} else {
bar(1, 2);
}
You follow company standards
user that's not python.. are you ok?
workplace violence
if
{
}
is more readable even your shitty ide uses auto indention having its own line is 100% better
Wh- what are you doing here???
Oh god no
Oh yes
label: do_something() and goto label
Loop ends when do_something returns false.
C:
int what(void)
{
//
}
everything else:
int nani() {
//
}
oops forgot code
C:
int what(void)
{
//
}
everything else:
int nani() {
//
}
The white man's method
if ( condition )
{
happenings
}
else if ( condition )
{
happenings
}
*The poo man's method
cmp $VALUE, $VALUE2
je label1
jmp label2
The only correct answer
if condition {
doSomething() ;
if isSomething() {
doSomethingElse() ;}
else {
doNothing() ;}}
Of course it stripped the whitespace.
imagine caring about this
this