![]() Therefore, the name of this method should focus on the change it actually creates, rather than the possible consequences of such a change.įurthermore, I would generally describe the visibility of an object as a visibility state. However, every time the method is executed, the "current" item that is selected in the preset list does change (that is a guarantee). The same applies to words like "toggle" or "update", as they all inherently mean "change" in their own way. The key difference here is that a change in value inherently means that the value will change, whereas in your example it's possible to jump from "show" to "show", therefore not changing the value. ![]() Therefore, you can't definitively say that this method will change the visbility. You are moving to the next item in a preset list, which may or may not change the value. Jumping to the next item in a list is exactly what you are doing in this method, rather than changing a value. MoveNext(), which is a method employed by enumerators that basically "jumps" to the next item in the list. Your description very much reminds me of. Those are not equivalent descriptions, and a method name should make a clear dinstinction here! You're not just toggling visibility here, you're progressing along a list of preset visibility options. It makes no sense to use a binary description (show/hide) for something that has more than two states (show/show/hide/show/show). In my comment above ( show, show, hide, show, show) I meant that those can be the consecutive results of an action at 5 different times. There are still only two states and not many. But it does not do hide and show alternatively. I want to name some function in software programming which does the hide/show job. Below is an adaptation of the comments I made to present a full answer. The comment thread above cleared up your question.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |