Overclock.net banner
1 - 15 of 15 Posts

· Registered
Joined
·
5,455 Posts
Most programming languages internally remove all blank spaces and line breaks before executing code, so it functions the same regardless.
Style is up to the programmer to decide. Some like it looking a certain way, while others like it looking another way.
 

· LTSC for life crew
Joined
·
6,693 Posts
Ok, I agree that it's coding, but why does it give such an uneasy feeing to it? Like it's more than just a coding question?
Whoever posted this is trying too hard to seem funny and intelligent and it's not working.
 

· Registered
Joined
·
5,455 Posts
Ok, I agree that it's coding, but why does it give such an uneasy feeing to it? Like it's more than just a coding question?
Because there are some who adamantly insist on separating the {} while others who insist on the opposite.
Some even insist on not using them altogether, for single-line functions, in certain languages.
 

· Registered
Joined
·
5,633 Posts
Discussion Starter · #7 ·
OK, so the humor behind the image is that there's two schools of thought, and that is what the gang reference is too. 1 vs. the other. I thought it was some sort of hidden meaning to me. Keep in mind I know nothing about coding so I didn't get it at first.
 

· Turtle Rig Fan
Joined
·
2,630 Posts
Best believe on blood
 

· Registered
Joined
·
653 Posts
I have been coding in C++ for over 20 years and I was taught the right side. However, its too hard to read and I have been using the left side. When you program and have a large app of 50,000 lines, its easier to read for me. However, that 50,000 line code is a lot bigger than if you program like the right side of the picture, you choose. This example does nothing in any language.
 
  • Rep+
Reactions: Paradigm Shifter

· Registered
Joined
·
4,331 Posts
I have been coding in C++ for over 20 years and I was taught the right side. However, its too hard to read and I have been using the left side. When you program and have a large app of 50,000 lines, its easier to read for me. However, that 50,000 line code is a lot bigger than if you program like the right side of the picture, you choose. This example does nothing in any language.
Yup. I want my code readable, dangit! By me, in five years, when I've completely forgotten why I put that little chunk of x86 assembly in there (oh yeah, it's because it's a lot faster than staying in pure C, although modern compilers are better) or why I did something a particular way.

Non-whitespace sensitive languages can be fun "Oh, I can do that in a one-liner!" (Har har, that one-liner is still 25,000 characters...) but I admit to getting frustrated with Python at times... I screw up syntax less using Vim than I do using a "helpful" "full featured" IDE... that said, my Python code is never terribly complicated or bulky, sooo...
 

· Registered
Joined
·
47 Posts
Alright,

What i understood about your post is that, you have accidentaly found it online and you fear it could be something that can act dengerous, your screenshot appears to show very primitive statements, I suggest you stay away from Red Frames ...
 

· Registered
Joined
·
653 Posts
On my current team (.NET shop), we use the right side. It's the only time in my career I've seen this usage in C#. It's rather annoying.
Ultimately it doesn't matter.
Preference
 
1 - 15 of 15 Posts
Top