Skip to content
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 and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RedisCommand::issue_typed<int>() #74

Open
rpj opened this issue Aug 17, 2023 · 0 comments
Open

Fix RedisCommand::issue_typed<int>() #74

rpj opened this issue Aug 17, 2023 · 0 comments
Labels
invalid This doesn't seem right

Comments

@rpj
Copy link
Member

rpj commented Aug 17, 2023

The semantics of RedisCommand::issue_typed<int>() are bad, specifically that it can return sentinel integers (INT_MAX - 0x0f or INT_MAX - 0xf0) in the "nil" or error return cases (respectively), meaning that as currently-implemented those values can not be used because they would be ambiguous! This is Bad ™️.

I'm thinking what we really need is an explicit RedisNil subclass of RedisObject that can be used in multiple places (string nil, array nil) and will fit into RESP3 support (#71) as it has an explicit "Nil" value.

@rpj rpj added the invalid This doesn't seem right label Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Development

No branches or pull requests

1 participant