rchain-community / rgov

RChain liquid democracy demo: capability sharing, mailbox, directory, chat, ...
https://rchain-community.github.io/rgov/
10 stars 14 forks source link

Issue.rho returns inconsistent types #171

Closed w2vy closed 3 years ago

w2vy commented 3 years ago

When a valid vote is cast it returns two lists: return!(["oldvote was",oldvote]) | return!(["newvote is",proposal]) |

When an invalid proposal is given it returns a map(?) return!({"unknown proposal": proposal, "valid proposals": proposalNames})

return types should be consistent

Is there any value in oldvote and newvote reporting to be in Par? Why not simply return!([oldvote, proposal])

w2vy commented 3 years ago

After completing the pyrgov code, I am not sure we can make uniform return structures in rholang. I settled on delegating that task to the wrapper layer above rholang, in my case python If this is a reasonable path for other upper layer languages then we can close this issue

w2vy commented 3 years ago

Receiving no objections I will close the issue I created. The API layer can provide a uniform interface to the application. Which makes sense since each language may have slightly different norms for a consistent API