Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
kvsm6688yIf the function needs to operate on a copy of an object, could you just have the function make the copy and then do whatever it needs?
-
Grumpy28878yIs the reference to the object an argument to the function? It almost sounds as if it's a global object.
-
If it makes you feel any better, I took 2.5 days to figure out that I was passing the wrong argument to a method :(
-
purged39438yJust make the function a method of the object and you wont be able to call the method until the object has been initialized.
-
@purged what if his function is a global one and it takes in multiple objects and just uses their getters other methods to do something or to extract information for whatever purpose? Too hard to tell with the little detail.
-
purged39438y@dalastTomCruise if he has one function that handles multiple different objects he should reconsider IMHO.
Related Rants
-
vane26I miss old internet. - without politics - without robots - without money - without big portals - without comme...
-
configurator8I was a little too harsh on a colleague today. He asked to help him get something working... After looking at...
-
Bacontaskmaster29I am so fucking jealous of all you assholes. Oh look at me, i am a full stack developer and yada yada. I have ...
I'm such a dumb fuck....
It took me fucking 30 mins to figure out that I use a function which relies on a copy of an object that's copied one line after the function call instead of before...
PLEASE KILL ME
undefined
selfrant