Skip to content

Reduce RESPValue initialization complexities and simplify RedisKey implementation

Nathan Harris requested to merge simplify-rediskey into master

Motivation:

RESPValue exposes a fair amount of complexity on how to intialize a single instance with the various overloads.

This aims to simplify the complexity for developers by providing a single initializer and relying on RESPValueConvertible to handle the complexities.

In addition, the Swift complier synthesizes a lot of default conformances that RedisKey has manually written, which is just unnecessary code.

Modifications:

  • Rename: RESPValue.init(_:) to RESPValue.init(from:)
  • Change: RESPValue.init String? and FixedWidthInteger overloads from public to internal
  • Remove: Unnecessary code for various protocol conformances for RedisKey

Result:

Developers should have a direct and guided way of making instances of RESPValue

Merge request reports