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

I will bet one beer... #8

Open
timholy opened this issue Aug 8, 2018 · 11 comments
Open

I will bet one beer... #8

timholy opened this issue Aug 8, 2018 · 11 comments

Comments

@timholy
Copy link
Collaborator

timholy commented Aug 8, 2018

...that this can be implemented now. While memory is hazy, I think the missing ingredient before was the ability to redefine the "trait dispatch depot" function and its recipients with new signatures when you extend this list of traits. But now we have Base.delete_method 😄.

@andyferris
Copy link
Owner

Yes - I was thinking the same. :)

@timholy
Copy link
Collaborator Author

timholy commented Aug 8, 2018

Glad to know you're as evil as I am. 👿

Wanna talk about this a bit at the hackathon? CC @mauro3.

@s-celles
Copy link

s-celles commented Aug 17, 2018

Hello,

What is current status of Traitor and Julia 0.7/1.0?
I need to port a C++ code with multiple inheritance and traits may be a way to do it (I'm also considering composition over inheritance but it will probably force me to duplicate some functions

Kind regards

@timholy
Copy link
Collaborator Author

timholy commented Aug 17, 2018

Right now it's a playground for ambitious developers who want to make a major contribution to Julia by implementing it 😄. Feel free to help out!

@andyferris
Copy link
Owner

To expand on that, it hasn’t been updated for the recent versions of Julia, and even on older versions it was incomplete in terms of reaching its goals. We would love to make it so but as a playground project it gets a lower priority on development time.

You can always perform trait based dispatch with your own dispatch pattern in order to port your code. We use such patterns throughout Julia and it’s ecosystem.

@mauro3
Copy link

mauro3 commented Aug 19, 2018

You can use the registered https://github.com/mauro3/SimpleTraits.jl, if you don't want to hand-code your trait-dispatch (with the added bonus of clearly marking traits for future refactors). Note though that the supported feature-set is less than what you can hand-code.

@c42f
Copy link
Collaborator

c42f commented Aug 20, 2018

Agreed, SimpleTraits is a much better package to look at if you're trying to get "real work" done right now, as opposed to having fun playing compiler/language developer :-P

@MasonProtter
Copy link

...that this can be implemented now.

Sorry could someone clarify what "this" refers to here?

@andyferris
Copy link
Owner

Sorry could someone clarify what "this" refers to here?

This package, or else the idea that this package represents? I haven't read it yet, but I'm supposing your #10?

@MasonProtter
Copy link

Oh, I see now. I didn't realize the issue was opened after this package stopped working. I thought Tim was talking about some specific feature 🤦

@andyferris
Copy link
Owner

It was, in fact, born stillborn - around the same time as the version of Julia that “broke” it.

It’s not really functional without add_backedge! which I only learned about this week.

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

6 participants