MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Python/comments/7oaay5/really/dsfafya/?context=3
r/Python • u/fabrikated • Jan 05 '18
317 comments sorted by
View all comments
Show parent comments
2
But they're not globals. They disappear when references are lost. Globals don't do that.
It has the same effect. If you're no longer holding reference to something, why does it need to still exist?
I could link you three dozen articles explaining why globals are a code smell, but I'll let you look it up yourself.
In the mean time, we can agree to disagree.
1 u/[deleted] Jan 09 '18 It doesn't change the fact that they're not globals. You don't need to maintain references to globals to keep them existing.And it is something that Java doesn't do, code smell or not.Just pack it in --- you've lost this one. I showed you something that Python can do that Java cannot. 2 u/scootstah Jan 09 '18 I guess you'll just have to get out of your box and learn to code the correct way. 1 u/[deleted] Jan 09 '18 Sorry, you're picking on the wrong guy. I've got several years of Java and Python and several other languages under my belt.Just admit defeat, admit that Python can do things that Java can't, and move on with your life. It's OK to be wrong. 2 u/scootstah Jan 09 '18 I don't agree that "Python can do things that Java can't" based solely on the fact that Java doesn't implement globals.Any problem that you can solve with Python, you can solve with Java. Simple as that. 1 u/[deleted] Jan 09 '18 Who would disagree with that? They're both Turing complete, after all.But that wasn't what I asserted and it wasn't what was asked.
1
It doesn't change the fact that they're not globals. You don't need to maintain references to globals to keep them existing.
And it is something that Java doesn't do, code smell or not.
Just pack it in --- you've lost this one. I showed you something that Python can do that Java cannot.
2 u/scootstah Jan 09 '18 I guess you'll just have to get out of your box and learn to code the correct way. 1 u/[deleted] Jan 09 '18 Sorry, you're picking on the wrong guy. I've got several years of Java and Python and several other languages under my belt.Just admit defeat, admit that Python can do things that Java can't, and move on with your life. It's OK to be wrong. 2 u/scootstah Jan 09 '18 I don't agree that "Python can do things that Java can't" based solely on the fact that Java doesn't implement globals.Any problem that you can solve with Python, you can solve with Java. Simple as that. 1 u/[deleted] Jan 09 '18 Who would disagree with that? They're both Turing complete, after all.But that wasn't what I asserted and it wasn't what was asked.
I guess you'll just have to get out of your box and learn to code the correct way.
1 u/[deleted] Jan 09 '18 Sorry, you're picking on the wrong guy. I've got several years of Java and Python and several other languages under my belt.Just admit defeat, admit that Python can do things that Java can't, and move on with your life. It's OK to be wrong. 2 u/scootstah Jan 09 '18 I don't agree that "Python can do things that Java can't" based solely on the fact that Java doesn't implement globals.Any problem that you can solve with Python, you can solve with Java. Simple as that. 1 u/[deleted] Jan 09 '18 Who would disagree with that? They're both Turing complete, after all.But that wasn't what I asserted and it wasn't what was asked.
Sorry, you're picking on the wrong guy. I've got several years of Java and Python and several other languages under my belt.
Just admit defeat, admit that Python can do things that Java can't, and move on with your life. It's OK to be wrong.
2 u/scootstah Jan 09 '18 I don't agree that "Python can do things that Java can't" based solely on the fact that Java doesn't implement globals.Any problem that you can solve with Python, you can solve with Java. Simple as that. 1 u/[deleted] Jan 09 '18 Who would disagree with that? They're both Turing complete, after all.But that wasn't what I asserted and it wasn't what was asked.
I don't agree that "Python can do things that Java can't" based solely on the fact that Java doesn't implement globals.
Any problem that you can solve with Python, you can solve with Java. Simple as that.
1 u/[deleted] Jan 09 '18 Who would disagree with that? They're both Turing complete, after all.But that wasn't what I asserted and it wasn't what was asked.
Who would disagree with that? They're both Turing complete, after all.
But that wasn't what I asserted and it wasn't what was asked.
2
u/scootstah Jan 09 '18
It has the same effect. If you're no longer holding reference to something, why does it need to still exist?
I could link you three dozen articles explaining why globals are a code smell, but I'll let you look it up yourself.
In the mean time, we can agree to disagree.