Databases use this three-state for decades. It seems to work fine.
On Dec 4, 2008, at 19:43, Francisco Jose Peredo wrote:
Pete Muir escribió:
> On 4 Dec 2008, at 16:57, Francisco Jose Peredo wrote:
>> Great job Dan!
>> You missed
> -> JIRA as Dan and I said
Fine, I'll JIRA.
>> Oh, and what is you opinon on:
> I think its fine, null == undefined which is valid state for
> to be in.
Yes, but I have always felt uneasy about a null boolean thing... the
point of boolean is to restrict the possible outcomes of something to
"true" or "false", but with a nullable boolean we now have 3
outcomes "true", "false" and "undefined"... and the problem
"undefined" is also "typeless" and therefore bug prone, the code:
//do something else
looks like something perfectly valid, but it turns out it can crash
because isUserInRole can return null.
I mean I can understand it for MailComponent.getBoolean, and
org.jboss.seam.ui.util.JSF.getBooleanValue, but I don't like it for
Wouldn't it be better to use an Enum if there are 3 or more possible
seam-dev mailing list