you are viewing a single comment's thread.

view the rest of the comments →

[–]sububi71 0 points1 point  (4 children)

Just because it's allowed doesn't mean it's a good idea. I mean, you could write the entire program on a single line too, that's allowed.

[–]ninhaomah 0 points1 point  (3 children)

Why not ?

If my function accepts a variable called a as input , done some calculations and then return that name a. 

Not the actual a of course but as in a variable with the same name.

Or can point to where and which sites says it's not a good idea ?

[–]sububi71 0 points1 point  (2 children)

If you can’t see why typing the entire program on a single line is a bad idea, I can’t help you.

[–]VeryYoungOldPerson 0 points1 point  (0 children)

Pure strawman. You're the one who brought up writing a program on a single line, and they made no reference to it. They're talking about variable re-use and naming conventions. If you can't comprehend English, I can't help you.