You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
there are enough examples to get started with Slap, but I'm left with unanswered questions about how the variables are named.
Take the first example, with an argument named username:
why is the associated variable named _username_vals rather than username ?
Are there any benefits for the extra _...._vals ?
Are these benefits worth the loss in readability ?
Does the leading underscore mean that _username_vals shouldn't be used directly ? If so, why ?
Cheers, and thanks for your work !
The text was updated successfully, but these errors were encountered:
Ok actually I've thought about it a bit more and if we remove _vals, then if you have an option called success for example, it will conflict with slap's success variable.
We should find a way to not have user-variables conflict with slap-variables
guardam
changed the title
Document the variable naming scheme & its rationale
Find a way to not have slap-variables conflict with user-variables
Nov 8, 2020
Hi,
there are enough examples to get started with Slap, but I'm left with unanswered questions about how the variables are named.
Take the first example, with an argument named
username
:why is the associated variable named
_username_vals
rather thanusername
?Are there any benefits for the extra
_...._vals
?Are these benefits worth the loss in readability ?
Does the leading underscore mean that
_username_vals
shouldn't be used directly ? If so, why ?Cheers, and thanks for your work !
The text was updated successfully, but these errors were encountered: