Boris Zbarsky wrote:
[EMAIL PROTECTED] wrote:
But on javascript the size_is attribute is also redundant
(array.length), why we don't hide this attribute in javascript ?
Blame me. In 1999 I decided to do it this way. There were two main
reasons:
1) Given the loose typing of JS, I thought having the JS param lists
more closely match the IDL param lists was less likely to cause JS
programmer error.
2) There are potential complicated cases involving arrays used as
buffer where both size_is and length_is come into play for which I
thought passing these params explicitly would be necessary. This
inclined me to think that it would be better to do this consistently
in all cases.
Subsequent authors of other XPCOM language mappings made their own
decisions.
Because XPConnect doesn't do it? It probably could, but you'd have to
fix all the code that would break as a result of the change, of course...
Exactly. Right or wrong, this is not the sort of thing one changes later.
John.
-Boris
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom