the amazing thing is that the event horizon of Java culture is so impenetrable that like a half dozen people are responding to this as if you *have* to do this in Java when that is demonstrably not the case — static methods work perfectly normally in it, like someClass.method()
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
This Tweet is unavailable.
-
uhhhm sweatie i think you mean something = SomeClassBuilderFactoryFactory.newFactoryFactory().newFactory().newBuilder().build().someUtilityMethod(whatever);
- 3 more replies
-
-
-
static methods shouldn't require instantiation, though this calls into question the entire point of classes and does tend to inspire lurid thoughts about module systems (or the inadequacies of such as it were)
-
yeah, what i'm depicting there is someone who has decided Static Methods Are Bad and is therefore burning malloc pointlessly to be able to call their utility method as an object method
- 2 more replies
New conversation -
-
-
nah leave it for now. it's most efficient for one call, since it doesn't create a reference to the object. if you need more utility method calls later, you can factor this to save a reference. :-)
-
yeah you better put a smiley
End of conversation
New conversation -
-
-
Yeah, you should probably inject a someclass factory...
-
it'd be more realistic, yeah, but 280 and all
End of conversation
New conversation -
-
-
Galaxy brain: theres a probabilistic algorithm in there that uses "this" as an rng seed.
-
Universe brain: only namespaced functions, no classes (credit:
@FlohOfWoe) - 4 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.