Swift style syntax

Viktor Kronvall viktor.kronvall at gmail.com
Thu Oct 15 23:53:36 UTC 2015

> but I'd vote for `Math.greaterThan`

I agree with this. This solution also disambiguates negate and minus which
is good. If we were to introduce operators as functions with syntax I would
prefer if there was some syntax to know if the operator was a binary or
unary function.

Regarding operators how does this proposal interact with the proposal for
value types and operator overloading?

2015-10-15 23:08 GMT+02:00 Michael McGlothlin <mike.mcglothlin at gmail.com>:

> It'd be simple to just define all operators as function​s and the actual
> operator is just syntaxial sugar. And then if you wanted to pass the
> operator you'd simply pass it's function around like you would any other
> function. Even your `Math.['>']` seems far safer than `Math.>` or just `>`
> but I'd vote for `Math.greaterThan` as being the best name. Saving a couple
> letters of typing isn't worth the price of hours more debugging.
> _______________________________________________
> 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/20151016/a0e2c66b/attachment.html>

More information about the es-discuss mailing list