Currently RESP (Redis protocol) only aggregate data type is the Array. However Redis commands return different things encoded as arrays that clients will actually return in different ways depending on the command. Clients could be simplified if RESP was able to reply in a way that provides explicit types of the reply instead of considering everything a flat list of elements. For example: 1. Use # instead of * to prefix the count for key,val pairs, unordered. Example: HGETALL (client libs will likely represent that data type with an hash). 2. Use * (as today) to prefix the count of ordered lists of elements. Example: LRANGE, ZRANGE (client libs will likely represent that with an array). 3. Use % instead of * to prefix the count of unordered list of elements. Example: SMEMBERS (client libs will use either an Hash with value set to Nil or a Set data type if there is a native one). 4. Use @ instead of * to prefix the count of ordered key,val pairs. Example: ZRANGE WITHSCORES (client libs will likely use an Array of two-element Arrays or something like that). 5. Use ! as a single way to represent NULL ($-1 and *-1 should be deprecated). 6. Use =3243432.432 to represent double values.

This change (that should be much more carefully designed) breaks compatibility with the past so shoud be introduced with a major new version, like Redis 4.0. However even if today is likely premature I wanted to create an issue ASAP so that we have something to reference when this discussion arises in order to collect ideas.