Skip to content

Interface for using te::concept_map for static dispatch #8

@griwes

Description

@griwes

Have you considered providing an interface that'd allow using the concept maps of this library for static dispatch, basically to provide a compile-time mechanism for customization points? Shouldn't be too hard to implement, judging by looking through the implementation.

I'm mainly interested in this because I've been working on a customization points thingy myself, although with slightly less Hana and slightly more Boost.PP (which is currently mostly necessary for my vision of the interface due to how we don't have reflection yet), and I'd love to be able to compare bananas to bananas.

The main difference between what I did (which I can hopefully get online soon) and what you did that I've been focused more on providing a customization point mechanism that sucks somewhat less than what's been available to date, and you've focused on providing runtime behavior; this is in essence very similar and requires a lot of common features.

Just few comments/questions not exactly related to the issue, I hope you don't mind putting them here:

  1. Are you going to present a talk about this at C++Now? (I've proposed a talk that's supposed to talk about my approach, so hopefully we can get some discussion about both the approaches if we both end up giving talks at the conference.)
  2. I believe (but I'm biased, so what do I know? :D) my end user interface is nicer than yours, unless until you hit templates, where the macro'd approach starts to get not very customizable at one point. More on point though, did you consider how te might look like when reflection becomes available? Mine should be mostly 1:1 identical, I wonder if yours is as easily translatable at the end user interface level.
  3. Have you thought about solving the problem of having to exit all of your namespaces to specialize the variable template in namespace te from some levels of end-user namespaces?

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