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?

More than 5 years have passed since last update.

naming > IsStarted() | IsOpen() or IsOpened() | IsClosed()

Last updated at Posted at 2017-08-30
動作環境
C++ Builder XE4

IsStarted / IsOpen

提供されたライブラリの関数に以下がある。

  • IsStarted()
  • IsOpen()

https://www.merriam-webster.com/dictionary/open
にはverb, noun, とadjectiveの例が掲載されている。

上記のIsOpenのOpenはadjectiveとしての命名なのだろう。

IsStarted / IsOpened

一方で、以下の命名例もGitHub上のコードなどにある。

  • IsStarted()
  • IsOpened()

こちらの場合のOpenはverbなのだろう。Openedとして「Openしている状態」という使い方。

IsClose / IsClosed

google検索: 「github "IsStarted" "IsClose"」 10件
google検索: 「github "IsStarted" "IsClosed"」 1470件

IsClosed()に合わせるとするとIsOpened()だろうか。
(対称性の観点から)

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?