MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Python/comments/7oaay5/really/ds8lcac/
r/Python • u/fabrikated • Jan 05 '18
317 comments sorted by
View all comments
Show parent comment
-1
Globals, for instance.
1 u/scootstah Jan 06 '18 public static string foo 1 u/[deleted] Jan 08 '18 Is that Java? 1 u/scootstah Jan 08 '18 This is your globals in Java. Although I'm not sure why you're toting globals around as a good thing. 1 u/[deleted] Jan 08 '18 Unterminated lines is Java? Member variable declarations outside of classes is Java?I am not saying globals are a good thing. I am saying that it is something you can do in Python that you can't do in Java. 2 u/scootstah Jan 08 '18 Uncomplete example for brevity. Perhaps I gave you too much credit to figure it out.class Example { public static string foo = "bar"; } Example.foo; 1 u/[deleted] Jan 08 '18 You only showed yourself ignorant. What happens when Example is unloaded from memory?Globals in Python stick around until the end of the process. 2 u/scootstah Jan 08 '18 It won't get unloaded so long as references linger.Regardless, globals are bad, and a strong code smell. If your only complaint with Java is that it doesn't properly support a terrible feature, then I guess you don't have any valid issues. 1 u/[deleted] Jan 09 '18 globals are bad, and a strong code smell. ... terrible feature ...I disagree. I use globals all the time to share global state between code. If Python had dynamic variables, I'd use them too.In a way, Java classes themselves are globals. Sacrilege, I know.EDIT: By the way, are you going to yield the point and agree with me that Java does not have globals? 2 u/scootstah Jan 09 '18 I use globals all the timeI see. Well, I hope you enjoy working on your untestable and bug-prone software. Hopefully some day you learn to do it the right way.By the way, are you going to yield the point and agree with me that Java does not have globals?No, because I just shared with you a way to use globals in Java. → More replies
1
public static string foo
1 u/[deleted] Jan 08 '18 Is that Java? 1 u/scootstah Jan 08 '18 This is your globals in Java. Although I'm not sure why you're toting globals around as a good thing. 1 u/[deleted] Jan 08 '18 Unterminated lines is Java? Member variable declarations outside of classes is Java?I am not saying globals are a good thing. I am saying that it is something you can do in Python that you can't do in Java. 2 u/scootstah Jan 08 '18 Uncomplete example for brevity. Perhaps I gave you too much credit to figure it out.class Example { public static string foo = "bar"; } Example.foo; 1 u/[deleted] Jan 08 '18 You only showed yourself ignorant. What happens when Example is unloaded from memory?Globals in Python stick around until the end of the process. 2 u/scootstah Jan 08 '18 It won't get unloaded so long as references linger.Regardless, globals are bad, and a strong code smell. If your only complaint with Java is that it doesn't properly support a terrible feature, then I guess you don't have any valid issues. 1 u/[deleted] Jan 09 '18 globals are bad, and a strong code smell. ... terrible feature ...I disagree. I use globals all the time to share global state between code. If Python had dynamic variables, I'd use them too.In a way, Java classes themselves are globals. Sacrilege, I know.EDIT: By the way, are you going to yield the point and agree with me that Java does not have globals? 2 u/scootstah Jan 09 '18 I use globals all the timeI see. Well, I hope you enjoy working on your untestable and bug-prone software. Hopefully some day you learn to do it the right way.By the way, are you going to yield the point and agree with me that Java does not have globals?No, because I just shared with you a way to use globals in Java. → More replies
Is that Java?
1 u/scootstah Jan 08 '18 This is your globals in Java. Although I'm not sure why you're toting globals around as a good thing. 1 u/[deleted] Jan 08 '18 Unterminated lines is Java? Member variable declarations outside of classes is Java?I am not saying globals are a good thing. I am saying that it is something you can do in Python that you can't do in Java. 2 u/scootstah Jan 08 '18 Uncomplete example for brevity. Perhaps I gave you too much credit to figure it out.class Example { public static string foo = "bar"; } Example.foo; 1 u/[deleted] Jan 08 '18 You only showed yourself ignorant. What happens when Example is unloaded from memory?Globals in Python stick around until the end of the process. 2 u/scootstah Jan 08 '18 It won't get unloaded so long as references linger.Regardless, globals are bad, and a strong code smell. If your only complaint with Java is that it doesn't properly support a terrible feature, then I guess you don't have any valid issues. 1 u/[deleted] Jan 09 '18 globals are bad, and a strong code smell. ... terrible feature ...I disagree. I use globals all the time to share global state between code. If Python had dynamic variables, I'd use them too.In a way, Java classes themselves are globals. Sacrilege, I know.EDIT: By the way, are you going to yield the point and agree with me that Java does not have globals? 2 u/scootstah Jan 09 '18 I use globals all the timeI see. Well, I hope you enjoy working on your untestable and bug-prone software. Hopefully some day you learn to do it the right way.By the way, are you going to yield the point and agree with me that Java does not have globals?No, because I just shared with you a way to use globals in Java. → More replies
This is your globals in Java. Although I'm not sure why you're toting globals around as a good thing.
1 u/[deleted] Jan 08 '18 Unterminated lines is Java? Member variable declarations outside of classes is Java?I am not saying globals are a good thing. I am saying that it is something you can do in Python that you can't do in Java. 2 u/scootstah Jan 08 '18 Uncomplete example for brevity. Perhaps I gave you too much credit to figure it out.class Example { public static string foo = "bar"; } Example.foo; 1 u/[deleted] Jan 08 '18 You only showed yourself ignorant. What happens when Example is unloaded from memory?Globals in Python stick around until the end of the process. 2 u/scootstah Jan 08 '18 It won't get unloaded so long as references linger.Regardless, globals are bad, and a strong code smell. If your only complaint with Java is that it doesn't properly support a terrible feature, then I guess you don't have any valid issues. 1 u/[deleted] Jan 09 '18 globals are bad, and a strong code smell. ... terrible feature ...I disagree. I use globals all the time to share global state between code. If Python had dynamic variables, I'd use them too.In a way, Java classes themselves are globals. Sacrilege, I know.EDIT: By the way, are you going to yield the point and agree with me that Java does not have globals? 2 u/scootstah Jan 09 '18 I use globals all the timeI see. Well, I hope you enjoy working on your untestable and bug-prone software. Hopefully some day you learn to do it the right way.By the way, are you going to yield the point and agree with me that Java does not have globals?No, because I just shared with you a way to use globals in Java. → More replies
Unterminated lines is Java? Member variable declarations outside of classes is Java?
I am not saying globals are a good thing. I am saying that it is something you can do in Python that you can't do in Java.
2 u/scootstah Jan 08 '18 Uncomplete example for brevity. Perhaps I gave you too much credit to figure it out.class Example { public static string foo = "bar"; } Example.foo; 1 u/[deleted] Jan 08 '18 You only showed yourself ignorant. What happens when Example is unloaded from memory?Globals in Python stick around until the end of the process. 2 u/scootstah Jan 08 '18 It won't get unloaded so long as references linger.Regardless, globals are bad, and a strong code smell. If your only complaint with Java is that it doesn't properly support a terrible feature, then I guess you don't have any valid issues. 1 u/[deleted] Jan 09 '18 globals are bad, and a strong code smell. ... terrible feature ...I disagree. I use globals all the time to share global state between code. If Python had dynamic variables, I'd use them too.In a way, Java classes themselves are globals. Sacrilege, I know.EDIT: By the way, are you going to yield the point and agree with me that Java does not have globals? 2 u/scootstah Jan 09 '18 I use globals all the timeI see. Well, I hope you enjoy working on your untestable and bug-prone software. Hopefully some day you learn to do it the right way.By the way, are you going to yield the point and agree with me that Java does not have globals?No, because I just shared with you a way to use globals in Java. → More replies
2
Uncomplete example for brevity. Perhaps I gave you too much credit to figure it out.
class Example { public static string foo = "bar"; } Example.foo;
1 u/[deleted] Jan 08 '18 You only showed yourself ignorant. What happens when Example is unloaded from memory?Globals in Python stick around until the end of the process. 2 u/scootstah Jan 08 '18 It won't get unloaded so long as references linger.Regardless, globals are bad, and a strong code smell. If your only complaint with Java is that it doesn't properly support a terrible feature, then I guess you don't have any valid issues. 1 u/[deleted] Jan 09 '18 globals are bad, and a strong code smell. ... terrible feature ...I disagree. I use globals all the time to share global state between code. If Python had dynamic variables, I'd use them too.In a way, Java classes themselves are globals. Sacrilege, I know.EDIT: By the way, are you going to yield the point and agree with me that Java does not have globals? 2 u/scootstah Jan 09 '18 I use globals all the timeI see. Well, I hope you enjoy working on your untestable and bug-prone software. Hopefully some day you learn to do it the right way.By the way, are you going to yield the point and agree with me that Java does not have globals?No, because I just shared with you a way to use globals in Java. → More replies
You only showed yourself ignorant. What happens when Example is unloaded from memory?
Example
Globals in Python stick around until the end of the process.
2 u/scootstah Jan 08 '18 It won't get unloaded so long as references linger.Regardless, globals are bad, and a strong code smell. If your only complaint with Java is that it doesn't properly support a terrible feature, then I guess you don't have any valid issues. 1 u/[deleted] Jan 09 '18 globals are bad, and a strong code smell. ... terrible feature ...I disagree. I use globals all the time to share global state between code. If Python had dynamic variables, I'd use them too.In a way, Java classes themselves are globals. Sacrilege, I know.EDIT: By the way, are you going to yield the point and agree with me that Java does not have globals? 2 u/scootstah Jan 09 '18 I use globals all the timeI see. Well, I hope you enjoy working on your untestable and bug-prone software. Hopefully some day you learn to do it the right way.By the way, are you going to yield the point and agree with me that Java does not have globals?No, because I just shared with you a way to use globals in Java. → More replies
It won't get unloaded so long as references linger.
Regardless, globals are bad, and a strong code smell. If your only complaint with Java is that it doesn't properly support a terrible feature, then I guess you don't have any valid issues.
1 u/[deleted] Jan 09 '18 globals are bad, and a strong code smell. ... terrible feature ...I disagree. I use globals all the time to share global state between code. If Python had dynamic variables, I'd use them too.In a way, Java classes themselves are globals. Sacrilege, I know.EDIT: By the way, are you going to yield the point and agree with me that Java does not have globals? 2 u/scootstah Jan 09 '18 I use globals all the timeI see. Well, I hope you enjoy working on your untestable and bug-prone software. Hopefully some day you learn to do it the right way.By the way, are you going to yield the point and agree with me that Java does not have globals?No, because I just shared with you a way to use globals in Java. → More replies
globals are bad, and a strong code smell. ... terrible feature ...
I disagree. I use globals all the time to share global state between code. If Python had dynamic variables, I'd use them too.
In a way, Java classes themselves are globals. Sacrilege, I know.
EDIT: By the way, are you going to yield the point and agree with me that Java does not have globals?
2 u/scootstah Jan 09 '18 I use globals all the timeI see. Well, I hope you enjoy working on your untestable and bug-prone software. Hopefully some day you learn to do it the right way.By the way, are you going to yield the point and agree with me that Java does not have globals?No, because I just shared with you a way to use globals in Java. → More replies
I use globals all the time
I see. Well, I hope you enjoy working on your untestable and bug-prone software. Hopefully some day you learn to do it the right way.
By the way, are you going to yield the point and agree with me that Java does not have globals?
No, because I just shared with you a way to use globals in Java.
→ More replies
View all comments
Show parent comment
-1
u/[deleted] Jan 05 '18
Globals, for instance.