Relative Content

Tag Archive for static-methods

“static” as a semantic clue about statelessness?

I’ve recently undertaken a refactoring of a medium sized project in Java to go back and add unit tests. When I realized what a pain it was to mock singletons and statics, I finally “got” what I’ve been reading about them all this time. (I’m one of those people that needs to learn from experience. Oh well.)

OO PHP static keyword, should I use it?

I’m writing script for fb and I have 3 objects that I’ll be using through all classes. I’m wondering if there is any advantage in using the static keyword except I don’t have to create an instance every time I need to use a method/object? Which way should I go, with static or without it?

How to implement syntax sugar in OO

I could implement a function as I did above. BUT my packages heavily rely on autoloading and are purely OO. Right now I just have to clone an submodule in the right directory and everything works fine.

How to implement syntax sugar in OO

I could implement a function as I did above. BUT my packages heavily rely on autoloading and are purely OO. Right now I just have to clone an submodule in the right directory and everything works fine.

Immutable vs mutable object as returned parameter for class method [closed]

It’s difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago. There is a class method (static method) in […]