Syntax for union types

James Clark jjc at jclark.com
Fri Oct 26 16:35:50 PDT 2007


(int, string) doesn't seem to me to be a syntax that the average JS
programmer will guess means union. I would have thought a better choice
would be (int | string) (especially given that regexps use |) or a keyword.

James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.mozilla.org/pipermail/es-discuss/attachments/20071027/43b64f88/attachment-0002.html 


More information about the Es4-discuss mailing list