Killing time

Brad Fitzpatrick brad at
Sun Jul 10 10:42:38 PDT 2005

I see the pros and cons of each.  While I initially sided toward 1/0, I
think I'm more in favor of true/false for all future booleans.

The main advantage I'd see in true/false is that it forces people (a bit
more?) to look at the key being there, and just doing:

   if (dictionary['is_valid']) {

If that returned undef/null (is_valid not being in the dict), most
languages would treat that as false in boolean context.

But this:

   if (dictionary['is_valid'] == 'true') {

Is more likely to emit warnings/errors in lots of languages if is_valid
isn't in the dictionary, which leads to people being more careful about
what they expect.

Plus true/false is very clearly a boolean, and not an integer value.

But if anybody else votes for 0/1, I'll listen to those arguments.

I'll get the spec updated this evening, I imagine, with the old elements
still there, but <s>struck-thru</s> and marked as deprecated.

The Net::OpenID::* modules will have a compat => 1 option to both
send/understand the old parameters, and LiveJournal will run with that for
awhile so we both send lifetime:60 and is_valid:1, as well as a WARNING,

WARNING:lifetime is being sent, but is deprecated.  use is_valid.  see specs.

- Brad

On Sun, 10 Jul 2005, Kristopher Tate wrote:

> I personally prefer boolean represented like that.
> When can we expect this updated on <>?
> -Kris
> On 2005/07/10, at 5:05 AM, Paul Crowley wrote:
> > (Brad, if you prefer "1" or "0" here I'm fine with that)

More information about the yadis mailing list