[OpenAjaxIDE] more optional/required attributes

Bertrand Le Roy Bertrand.Le.Roy at microsoft.com
Wed Sep 10 12:44:03 PDT 2008

Actually no, it's not totally accurate. Returning undefined and not returning anything is subtly different (and Firefox in strict mode may flag the difference with a warning).
Sure, I don't think anyone will ever use undefined to mean that they will explicitly return something that is undefined but I thought I'd make the point anyway. I think we had that exact same discussion a while ago when we discussed "void".

From: ide-bounces at openajax.org [mailto:ide-bounces at openajax.org] On Behalf Of Lori Hylan-Cho
Sent: Wednesday, September 10, 2008 11:12 AM
To: ide at openajax.org; Jon Ferraiolo
Subject: Re: [OpenAjaxIDE] more optional/required attributes

If we're not going to require datatype on <returns>, I'd vote for undefined as the default value. It's accurate, and it's in line with what functions that just return; do.

As for <exception>, I'm not sure that a default of 'Error' is any more informative than no datatype at all. Is it likely that library authors will want to put empty, attributeless <exception /> tags in their metadata?

From: Jon Ferraiolo [mailto:jferrai at us.ibm.com]
Sent: Wednesday, September 10, 2008 12:04 PM
To: Lori Hylan-Cho
Cc: ide at openajax.org
Subject: Re: [OpenAjaxIDE] more optional/required attributes

Hi Lori,
I looked at JSDoc and it says that the type value is optional on @returns. (http://jsdoctoolkit.org/wiki/?page=returns) Therefore, it seems to me that we should try to make 'datatype' on our <returns> element optional, also. But that raises the question about what is the default 'datatype' for <returns> in case 'datatype' is not specified. I would guess "*" is the best default value for 'datatype' on <returns>.

Regarding <exception>, once again JSDoc says that the type is optional on @throws, so once again I think we should make datatype optional on <exception>. I would guess that 'Error' would be the best default value for 'datatype' on <exception>.


[cid:image001.gif at 01C91342.E7E1BD30]Lori Hylan-Cho <lorihc at aptana.com>

Hi again

Our developer came across two other attributes that are listed as optional in the API metadata spec but that we need to be required. Actually, they're the same attribute -- datatype -- on two different tags. One is <returns>, which we discussed today. It seems like datatype is the whole reason for the <returns> tag's existence. (As we talked about today, paramType and paramValue, the two new attributes for <returns>, can be optional.)

The other tag is <exception>, where we think datatype is also essential.

Let me know if anyone disagrees.


Lori Hylan-Cho Ajax Wrangler Aptana, Inc.
lorihc at aptana.com 650.207.1905 avocadoh (Y!/AIM/GTalk)
IDE mailing list
IDE at openajax.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openajax.org/pipermail/ide/attachments/20080910/f3500c4a/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 105 bytes
Desc: image001.gif
Url : http://openajax.org/pipermail/ide/attachments/20080910/f3500c4a/attachment-0001.gif 

More information about the IDE mailing list