Skip to content

Protocol usage review #23

@asmodehn

Description

@asmodehn

Protocols are currently a bit misused in the code design... we are using them with a new() function to convert data on callsite.

We should consider Protocol as providing the capability to be "used as a different type of data, regardless the original data structure".
For instance having one function per key of the map we want to emulate.
The struct being one specific, optimized version of this protocol...

This applies specifically for the code in the :xest library where we want to have a "common data format" for our purpose.

It seems it would make the conversion rules clearer, and would mean that we do the conversion only as needed, even if it might be a bit more cumbersome to write the first time...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions