- From: Jim Barnett <Jim.Barnett@genesyslab.com>
- Date: Fri, 5 Apr 2013 18:12:26 +0000
- To: David Junger <tffy@free.fr>, Voice Public List <www-voice@w3.org>
- Message-ID: <57A15FAF9E58F841B2B1651FFE16D2810353A8@GENSJZMBX02.msg.int.genesyslab.com>
In C.2.1 we say that any data element that is declared but not assigned a value gets 'undefined' as its value, so it's consistent to do that in _event as well. I don't think that we can say that <data> elements can have any initial value that evaluates to Boolean false because numbers are common values. So it's probably best to say that anything without a value is undefined. - Jim From: David Junger [mailto:tffy@free.fr] Sent: Friday, April 05, 2013 2:03 PM To: Voice Public List Subject: Re: empty fields in SCXML events. Le 5 apr 2013 à 19:38, Jim Barnett a écrit : So we say that the values of empty event fields is 'Undefined'? I don't care personally, I just want something that ECMAScript programmers will find intuitive and consistent. They (we) will have no problem with 'undefined'. Honestly, it won't matter since you rarely do if(value===undefined) in real code. Unless you expect "" or similar falsy values and you intend to treat them differently. But "" is not a valid event name, or origin, or type, etc, so there is no reason not to test if(value) and thus ignore the type. "" is a valid event.data but so is undefined or any other special value that we come up with. David
Received on Friday, 5 April 2013 18:12:53 UTC