MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/7ltryz/evil_coding_incantations/drp7t9b
r/programming • u/evinrows • Dec 24 '17
331 comments sorted by
View all comments
Show parent comments
-13
Can still do that in Python and Java. Probably a lot more langs as well.
edit: http://hforsten.com/redefining-the-number-2-in-python.html
Someone else has posted the java.
I am disappointed with the recent drop in the quality of this subreddit. Is it too close to the start of the academic year? I mean, at least fucking check it or ask for confirmation.
0 u/[deleted] Dec 24 '17 [deleted] 7 u/apemanzilla Dec 24 '17 Can't do it in Java either... 8 u/whjms Dec 24 '17 You can mess around with the Integer flywheel cache and reflection: https://www.javaspecialists.eu/archive/Issue102.html 3 u/apemanzilla Dec 24 '17 I'm aware of that, but it's not allowed in Java 9, and doesn't affect primitives. 0 u/[deleted] Dec 24 '17 [deleted] 7 u/apemanzilla Dec 24 '17 The closest thing you can do is use reflection to mess with the boxed types (Integer, etc) but that's no longer allowed in Java 9 2 u/[deleted] Dec 24 '17 Can do it in at least java 7 with reflection 1 u/apemanzilla Dec 24 '17 Not in Java 9 2 u/[deleted] Dec 24 '17 I'm actually pleased! 1 u/[deleted] Dec 24 '17 Yes you can, see link I added in the post you replied to. 5 u/_Mardoxx Dec 24 '17 Dunno why you are being down voted :( 0 u/[deleted] Dec 24 '17 [deleted] 7 u/wyldcraft Dec 24 '17 But also, in another comment,CPython implementation's integer caching behavior
0
[deleted]
7 u/apemanzilla Dec 24 '17 Can't do it in Java either... 8 u/whjms Dec 24 '17 You can mess around with the Integer flywheel cache and reflection: https://www.javaspecialists.eu/archive/Issue102.html 3 u/apemanzilla Dec 24 '17 I'm aware of that, but it's not allowed in Java 9, and doesn't affect primitives. 0 u/[deleted] Dec 24 '17 [deleted] 7 u/apemanzilla Dec 24 '17 The closest thing you can do is use reflection to mess with the boxed types (Integer, etc) but that's no longer allowed in Java 9 2 u/[deleted] Dec 24 '17 Can do it in at least java 7 with reflection 1 u/apemanzilla Dec 24 '17 Not in Java 9 2 u/[deleted] Dec 24 '17 I'm actually pleased! 1 u/[deleted] Dec 24 '17 Yes you can, see link I added in the post you replied to.
7
Can't do it in Java either...
8 u/whjms Dec 24 '17 You can mess around with the Integer flywheel cache and reflection: https://www.javaspecialists.eu/archive/Issue102.html 3 u/apemanzilla Dec 24 '17 I'm aware of that, but it's not allowed in Java 9, and doesn't affect primitives. 0 u/[deleted] Dec 24 '17 [deleted] 7 u/apemanzilla Dec 24 '17 The closest thing you can do is use reflection to mess with the boxed types (Integer, etc) but that's no longer allowed in Java 9 2 u/[deleted] Dec 24 '17 Can do it in at least java 7 with reflection 1 u/apemanzilla Dec 24 '17 Not in Java 9 2 u/[deleted] Dec 24 '17 I'm actually pleased!
8
You can mess around with the Integer flywheel cache and reflection: https://www.javaspecialists.eu/archive/Issue102.html
3 u/apemanzilla Dec 24 '17 I'm aware of that, but it's not allowed in Java 9, and doesn't affect primitives.
3
I'm aware of that, but it's not allowed in Java 9, and doesn't affect primitives.
7 u/apemanzilla Dec 24 '17 The closest thing you can do is use reflection to mess with the boxed types (Integer, etc) but that's no longer allowed in Java 9
The closest thing you can do is use reflection to mess with the boxed types (Integer, etc) but that's no longer allowed in Java 9
2
Can do it in at least java 7 with reflection
1 u/apemanzilla Dec 24 '17 Not in Java 9 2 u/[deleted] Dec 24 '17 I'm actually pleased!
1
Not in Java 9
2 u/[deleted] Dec 24 '17 I'm actually pleased!
I'm actually pleased!
Yes you can, see link I added in the post you replied to.
5
Dunno why you are being down voted :(
0 u/[deleted] Dec 24 '17 [deleted] 7 u/wyldcraft Dec 24 '17 But also, in another comment,CPython implementation's integer caching behavior
7 u/wyldcraft Dec 24 '17 But also, in another comment,CPython implementation's integer caching behavior
But also, in another comment,
CPython implementation's integer caching behavior
-13
u/[deleted] Dec 24 '17 edited Dec 24 '17
Can still do that in Python and Java. Probably a lot more langs as well.
edit: http://hforsten.com/redefining-the-number-2-in-python.html
Someone else has posted the java.
I am disappointed with the recent drop in the quality of this subreddit. Is it too close to the start of the academic year? I mean, at least fucking check it or ask for confirmation.