pleiad / Ghosts

www.pleiad.cl/ghosts
3 stars 0 forks source link

Ghost getters/setters logic #5

Open rjacas opened 11 years ago

rjacas commented 11 years ago

When calling a getter of a Ghost, thus creating such method, the Ghost Perspective ignore that the method is a getter, that is, it does not creates a corresponding variable. Same goes for setters.

Is such behavior desirable?

etanter commented 11 years ago

How would you be sure it is a getter?

rjacas commented 11 years ago

Apologies, due to a filter i just noticed this thread.

I'm guessing that there is no correct answer here. I would call a method getter/setter if it complies with the getName()/setName() structure. Since the Ghost is meant to be used, later on, for testing, there is no damage in creating unnecesary members during testing, the user could perfectly erase them later. I am inclined to believe that there are far more hits than false positives with this aproach.

2013/5/6 Éric Tanter notifications@github.com

How would you be sure it is a getter?

— Reply to this email directly or view it on GitHubhttps://github.com/pleiad/Ghosts/issues/5#issuecomment-17520106 .

lets reign all together

etanter commented 11 years ago

Ok - this could be a configurable feature ("introduce field with getter/setter ghost method").

rjacas commented 11 years ago

I agree, a configurable feature sounds good.

2013/5/15 Éric Tanter notifications@github.com

Ok - this could be a configurable feature ("introduce field with getter/setter ghost method").

— Reply to this email directly or view it on GitHubhttps://github.com/pleiad/Ghosts/issues/5#issuecomment-17960566 .

lets reign all together