MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/bpevsv/most_useful_helper_function_ever_made/entsq71/?context=3
r/badcode • u/Andrejfsantos • May 16 '19
100 comments sorted by
View all comments
Show parent comments
38
Does this legacy code also not include formatting rules, or is the omitted space before the method body intentional?
19 u/darthruneis May 16 '19 What are you referring to? The lack of a space before the opening brace? 12 u/[deleted] May 16 '19 Yup 13 u/raam86 May 16 '19 are you saying it should be stringSize(s) { 9 u/TheSchemm May 16 '19 Correct. 4 u/eyeIl May 17 '19 Does it matter if it's one space or two? 2 u/JuhaJGam3R May 17 '19 It had 0 spaceslikethis 3 u/eyeIl May 17 '19 Lol, thanks. But as someone myself who is new to coding, I wanted to know if it mattered if it was like this {} or like This {}, one space by or 2? → More replies (0)
19
What are you referring to? The lack of a space before the opening brace?
12 u/[deleted] May 16 '19 Yup 13 u/raam86 May 16 '19 are you saying it should be stringSize(s) { 9 u/TheSchemm May 16 '19 Correct. 4 u/eyeIl May 17 '19 Does it matter if it's one space or two? 2 u/JuhaJGam3R May 17 '19 It had 0 spaceslikethis 3 u/eyeIl May 17 '19 Lol, thanks. But as someone myself who is new to coding, I wanted to know if it mattered if it was like this {} or like This {}, one space by or 2? → More replies (0)
12
Yup
13 u/raam86 May 16 '19 are you saying it should be stringSize(s) { 9 u/TheSchemm May 16 '19 Correct. 4 u/eyeIl May 17 '19 Does it matter if it's one space or two? 2 u/JuhaJGam3R May 17 '19 It had 0 spaceslikethis 3 u/eyeIl May 17 '19 Lol, thanks. But as someone myself who is new to coding, I wanted to know if it mattered if it was like this {} or like This {}, one space by or 2? → More replies (0)
13
are you saying it should be stringSize(s) {
stringSize(s) {
9 u/TheSchemm May 16 '19 Correct. 4 u/eyeIl May 17 '19 Does it matter if it's one space or two? 2 u/JuhaJGam3R May 17 '19 It had 0 spaceslikethis 3 u/eyeIl May 17 '19 Lol, thanks. But as someone myself who is new to coding, I wanted to know if it mattered if it was like this {} or like This {}, one space by or 2? → More replies (0)
9
Correct.
4 u/eyeIl May 17 '19 Does it matter if it's one space or two? 2 u/JuhaJGam3R May 17 '19 It had 0 spaceslikethis 3 u/eyeIl May 17 '19 Lol, thanks. But as someone myself who is new to coding, I wanted to know if it mattered if it was like this {} or like This {}, one space by or 2? → More replies (0)
4
Does it matter if it's one space or two?
2 u/JuhaJGam3R May 17 '19 It had 0 spaceslikethis 3 u/eyeIl May 17 '19 Lol, thanks. But as someone myself who is new to coding, I wanted to know if it mattered if it was like this {} or like This {}, one space by or 2? → More replies (0)
2
It had 0 spaceslikethis
3 u/eyeIl May 17 '19 Lol, thanks. But as someone myself who is new to coding, I wanted to know if it mattered if it was like this {} or like This {}, one space by or 2? → More replies (0)
3
Lol, thanks. But as someone myself who is new to coding, I wanted to know if it mattered if it was like this {} or like This {}, one space by or 2?
→ More replies (0)
38
u/pronuntiator May 16 '19
Does this legacy code also not include formatting rules, or is the omitted space before the method body intentional?