-
-
Notifications
You must be signed in to change notification settings - Fork 879
-
Hey guys! Quick question...
Why are some functions camelCased while others are not? Like tryFunction/trycatch. Is there a rule behind it?
Beta Was this translation helpful? Give feedback.
All reactions
@svallory Thanks for opening this discussion. Where are you referring to, specifically? Documentation, namespace?
Looking at the docs and namespace, it does look like we are inconsistent here:
In this particular case, I don't think we have a rationale for diverging conventions. I'd be inclined to update trythen
and trycatch
to tryThen
and tryCatch
, as this seems preferable to tryfunction
and tryrequire
.
Replies: 1 comment 1 reply
-
@svallory Thanks for opening this discussion. Where are you referring to, specifically? Documentation, namespace?
Looking at the docs and namespace, it does look like we are inconsistent here:
In this particular case, I don't think we have a rationale for diverging conventions. I'd be inclined to update trythen
and trycatch
to tryThen
and tryCatch
, as this seems preferable to tryfunction
and tryrequire
.
Beta Was this translation helpful? Give feedback.
All reactions
-
Great! Sticking to a convention helps newcomers a lot!
I was reading the documentation, and noticed there are several functions that don't follow the camelCase pattern and instead are all lowercase. safeintmin
is another example.
There were enough that I thought there could be a reason. Even when there is, may I suggest adding aliases?
For example, if safeintmin
is all in lowercase due to some historical or contextual reason, just add a alias safeIntMin
Beta Was this translation helpful? Give feedback.