Optional argument types

Aron Homberg info at aron-homberg.de
Mon Sep 24 12:16:55 PDT 2012

Just to know the process better:
For such ideas, who is allowed to write a strawman-page in the wiki?


Personally, I would like guards without that magic '::' syntax. Why
reinventing the wheel?
Just allowing/checking optional type's would be great:

var Number|Boolean|Null abc = null;
var String foo = 'bar';
var withoutType = 'yes';

function optType(HTMLElement|String domEl, withoutType='again') {
    // Nice lang :)

But this is only noise... :)


2012/9/24 Dmitry Soshnikov <dmitry.soshnikov at gmail.com>

> On Mon, Sep 24, 2012 at 11:26 AM, Allen Wirfs-Brock <allen at wirfs-brock.com
> > wrote:
>> But, getting back to Dmitry's original question.  These haven't  been
>> accepted as proposal for ES6 and it it is also certainly  "too late" for
>> that to happen.  Future editions, beyond ES6 is very much open for
>> discussion.
> I think it's just the matter of the need. If these optional argument types
> are very needed by devs, then it's probably not a big deal to add them to
> the standard -- after all it's still in the draft, not published (it's just
> a small section on generating the prologue, isn't it?).
> If they are not much needed, then even future editions won't be so
> essential in this respect.
> Dmitry
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120924/bfb31ecb/attachment.html>

More information about the es-discuss mailing list