When you should and should not use the 'new' keyword?
- by skizeey
I watched a Google Tech Talk presentation on Unit Testing, given by Misko Hevery, and he said to avoid using the new keyword in business logic code.
I wrote a program, and I did end up using the new keyword here and there, but they were mostly for instantiating objects that hold data (ie, they didn't have any functions or methods).
I'm wondering, did I do something wrong when I used the new keyword for my program. And where can we break that 'rule'?