-
Notifications
You must be signed in to change notification settings - Fork 18
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
concept primitives? #3
Comments
It seems like a good idea, especially the concepts used in C++ here. Of course there is no need to define them for concepts like |
I wonder if the OP was referring to the algebraic concepts, which Peter Gottschling also detailed in TR638 back in 2006. I stayed started playing around with algebraic traits for Boost.Math but perhaps this is a more logical place to try it out. |
I believe that the concepts must be added by the library that use them. Adding concepts that no library use is a lost of time IMHO. Another this is having some of those concepts implemented as examples to check the usability of the library. |
Sure, that makes sense, assuming you mean things like graph concepts are in the Boost.Graph library, etc? What do we consider as 'standard' concepts, i.e. deserving of being in the C++ standard library or at least built-in to a concept-checking library? E.g. iterator concepts, algebraic concepts, etc. |
I admit that the library could provide the C++ standard library requirements as Tick constraints as we can not have them on the C++ standard library. What algebraic concepts would you like to have? |
The ones defined in Elements of Programming and also in TR638, which I mentioned above: magma, monoid, ring, field, group, module, etc. On a side note, I would also like algebraic traits of types in a similar style to |
Any more thoughts on this? I'm quite interested in following it up. |
The tick library is focused on syntactic-based concepts like the ones defined in the Concepts TS. To support the algebraic_traits the library would need more semantic-based concepts, and a framework for handling those type of concepts. I think semantic-based concepts would be very useful. The library could definitely grow to support them, which the library would expand beyond just a concepts traits library to supporting a full-range of concepts. Although, I haven't fully thought about the best way to define semantic-based concepts in a library and how they interact with syntactic concepts, but I imagine it would be close to how hana defines its type classes. This is definitely an interesting area to explore. |
I agree that semantic-based concepts needs either well established practice or explicit mapping, as Hana does. I believe that this is out of the scope of the library. |
I made a primitive implementation of algebraic traits here just as a proof-of-concept. I'm no expert on template metaprogramming so please don't be horrified by any egregious shortcomings in my code. But the basic example is |
So initial documentation for the traits provided by the library has been added here. This should cover the basic concept primitives. |
The document includes a nice page for documenting is_forward_iterator. That page suggests that the header exists: #include <tick/traits/is_forward_iterator.h> But I find no such header in the package. What's up with this? |
The file is here. I am not sure why it missing for you. Its there when I clone it from github. |
Have you thought of including some basic primitive concepts? like those defined in "Elements of Programming" and similar to what will be in concepts-lite
The text was updated successfully, but these errors were encountered: