Re: Re: Re: Re[2]: Re: class proposal

"Mark Hahn" <[email protected]> Thu, 15 Jul 2004 17:10:35 -0700
Newsgroups gmane.comp.lang.prothon.user
Message-ID <004801c46ac9$5154cfe0$0d01a8c0@MarkVaio>
Christian Tismer wrote:

>> I will make it file.open() and file.open?.
>
> Why that? You are also asking if it is closed?,
> so why don't you ask whether it is opened?

Technically, "if open" means whether it is open now and "if opened" means
whether it has ever been open in the past.  So when asking for a current
state, it should not end in "ed".

I agree "isOpen" could be used, but I like open? and the ? tells you
instantly it is a question (state).  It gives good readability just like the
! (shriek). :-)

Modifying things in place deserves a shriek, don't you think?  Not noticing
that is very bad.