Replace sanity language in combineReducers by seanmhanson · Pull Request #2335 · reduxjs/redux (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation2 Commits1 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

seanmhanson

This addresses issue #2334

This replaces sanityError and assertReducerSanity with more descriptive, less ableist language that describes what the check is actually doing (checking and asserting the shape). I'm proposing to call it assertReducerShape and describe the error as a shapeAssertionError so that we're more precise and more inclusive at the same time!

@seanmhanson

This replaces sanityError and assertReducerSanity with more descriptive, more inclusive language that describes what the check is actually doing (checking and asserting the shape).

@timdorr

Yep, that's a more accurate description of the check being done and the intended scope.

However, I very much disagree with this being ableist language. "Sanity" in this case is the literal definition of the word: "reasonable and rational behavior." That is rather ambiguous in the case of a code assertion (hence, it should be changed), but has nothing to do with inclusion issues or stigmatizing mental disease.

@gaearon

Thanks for the change! I was using the commonly known definition of sanity check and didn't really think about other meanings. I agree the change is for the better. 👍

seantcoyote pushed a commit to seantcoyote/redux that referenced this pull request

Jan 14, 2018

@seanmhanson @seantcoyote

This replaces sanityError and assertReducerSanity with more descriptive, more inclusive language that describes what the check is actually doing (checking and asserting the shape).