-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't doc
functions in Math
#187
Comments
Interesting, I did not even know that `Math` is a special namespace:
https://cljs.github.io/api/syntax/Math-namespace
I don't think there are 'vars' associated with these special namespaces. I
suppose we could import docstrings from
https://www.w3schools.com/js/js_math.asp? or
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math
(depending on their licenses), or write our own. We could also do this for
other stuff in the `js/` namespace which we know to be available in
most/all browsers. an easy onramp to the most-likely-to-be-needed
javascript/browser functions..
|
MDN, which I generally prefer, is CC-BY-SA licensed: https://developer.mozilla.org/en-US/docs/MDN/About#Copyrights_and_licenses |
We should make sure to override our usual clojuredocs link with a link to https://cljs.github.io/api/syntax/Math-namespace. |
Would we want to provide non "special namespaced" versions of the common functions to make the experience more uniform for learners? |
I think we could take the "pretend-to-be-a-var" pathway that already exists
for repl-specials, and extend it for `Math`. That would have the advantage
of only being a tooling augmentation, and keep user code portable (without
dependencies).
…On Tue, Mar 6, 2018 at 8:40 AM, Jack Rusher ***@***.***> wrote:
Would we want to provide non "special namespaced" versions of the common
functions to make the experience more uniform for learners?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#187 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAKFZ7Qgc7jKm7uxfkxTRaDOdacLkbrCks5tbj1sgaJpZM4Sclzg>
.
--
http://matt.is — Berlin, Germany
--
|
I'm torn. Math functions are almost a good time to introduce the concepts of namespaces and JavaScript...but they feel too soon. So yeah, I agree we should pretend to be a var, and in the source for those specials we point to CLJS.github.io and MDN. |
Issue:
(doc Math/sin)
returnsThe text was updated successfully, but these errors were encountered: