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

Consider Trait/Inheritance implementation for FTW objects #78

Open
JackDunaway opened this issue Jun 8, 2016 · 0 comments
Open

Consider Trait/Inheritance implementation for FTW objects #78

JackDunaway opened this issue Jun 8, 2016 · 0 comments

Comments

@JackDunaway
Copy link
Member

For example, a Request kindof inherits from JSON. But not really; it's more like "a Request has a JSON wire-level protocol, and it would be handy to use JSON functions to modify this part of the Request object".

When a Request is created, it currently must clumsily create the FTW-Reply-MsgControl structure as a field within the JSON.

This is suboptimal for at least a couple reasons:

  • the object cannot be iterated with Keys without exposing this private framework field to the application layer
  • it's inefficient/brittle, where it would be more desirable to make each a strongly-typed private field of the Request object
  • it represents both the Request and the Reply, where fields must be consumed from the Request in order to not be repeated to the Reply (this is actually both good and bad)

Ideally, the Request object could use JSON functions directly, where it's implicit that those functions act upon the Reply object embedded within the Request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant