0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

『Does ~~~』という命名があっていいのでは?

Last updated at Posted at 2025-09-01

よくある命名

命名 用例
Is ~~~ IsValid
Has ~~~ HasItem
Has ~~~ HasEntered
Can ~~~ CanRegister
Should ~~~ ShouldQuit

でも、『Does ~~~』という命名って、あまり見ない気がする。
Yes/No で答えられるし、もっと使われていいと思うのだが。

使い方

例えば、こんなふうに使えそう。

void hoge(bool does_mark_as_dirty);
struct Collection
{
    bool does_contain(int value);
};
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?