Math.roundUp(), an alias for Math.ceil()

Eric Andrew Lewis eric.andrew.lewis at gmail.com
Sat Aug 4 22:55:21 UTC 2018


Hi there,

this is my first message to the list. Thanks for all that you do to
improve  the programming language for the web!

This is probably a curious proposal that will go nowhere but I thought it'd
be interesting to share a suggestion and see how it goes.

I teach introductory JavaScript. Students have a hard time remembering the
method name Math.ceil(). It looks like the name "ceil" dates back to at
least the C programming language, and probably earlier.

I suggest introducing Math.roundUp() as an alias for Math.ceil() to provide
an easier to read and remember method name. If this makes sense,
introducing Math.roundDown() might be a good alias for Math.floor() as well.

I searched for previous discussions on creating method name aliases and
couldn't find one to see how the committee has made decisions about them in
the past.

Thanks,
-- 
Eric Lewis
ericandrewlewis.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20180804/36767093/attachment-0001.html>


More information about the es-discuss mailing list