Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Reduce some boilerplate without needing higher-kinded types. #7

Closed
wants to merge 1 commit into from

Conversation

saeta
Copy link
Contributor

@saeta saeta commented Jul 22, 2020

Just a first pass. Note that this doesn't work for all the kinds of things you'd like to do with the structural protocols (e.g. CustomDebugString).

Just a first pass. Note that this doesn't work for all the kinds of things you'd like to do with the structural protocols (e.g. `CustomDebugString`).
@saeta
Copy link
Contributor Author

saeta commented Jul 22, 2020

CC @shabalind / @dabrahams

// limitations under the License.

/// A type that can be converted to and from its structural representation.
public protocol Forwardable {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this just what the Structural protocol provides?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I thought about conforming all the StructuralCons types to Structural themselves, but was concerned that was a little too meta... but if you're intrigued by that direction too, then perhaps it's worth while to explore what that might look like. :-D

@shabalind
Copy link
Contributor

Closing this experimental PR for now similarly to #10. We might revisit it later.

@shabalind shabalind closed this Sep 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants