tweag / nickel

Better configuration for less
https://nickel-lang.org/
MIT License
2.43k stars 93 forks source link

Add trigonometric functions, pi, e and log to the numbers module #2006

Closed Hugal31 closed 4 months ago

Hugal31 commented 4 months ago

Closes #2005.

Hugal31 commented 4 months ago
* we tend to privilege long names over C/Rust-style short names. So I wonder if we shouldn't call them (at least the user-facing stdlib functions) `arc_cosine`, `cosine`, etc. On the other hand, the current short names are so pervasive - they are the same in C, Java, Haskell, OCaml, etc. - that maybe it's better to keep the historical version. In any case, this is not blocking for now - we can still bikeshed and do a renaming before the next release. It's just me thinking out loud.

I don't think I know any language that use cosine, sine, tangent, so I think it's not a good choice for the stdlib (I can change the primop name if you want). I'm more ok with arccos arcsin, arctan and arctan2.

Edit: should I prefix pow as well?