Update Error Message to Explain Namespace Restrictions for :=
and let
in data.table
#6302
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #5357.
Summary of Changes:
The error message related to the use of
:=
andlet
within thedata.table
package has been updated to provide clearer guidance on namespace appending. The new error message now includes specific information that namespace appending such asdata.table:::=
is not allowed.Details:
The functions
:=
andlet
indata.table
are designed to work with non-standard evaluation (NSE). When these functions are used with a namespace prefix (e.g.,data.table:::=
), the NSE mechanisms fail to operate as intended, leading to confusing error messages. The new error message is intended to directly address this misuse and guide users towards the correct usage patterns.