-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Pulling methods out of struct definitions #54
Comments
This is something I would like to do very soon. I have some major changes I'm going to merge today. So just after that is fine. When it's done, I'll personally test it since we don't have complete code coverage yet. Thank you! |
Great! Just ping me when you think you're ready. I came up with a pretty good system for reorganize the code last night, so I should be able to get it done quickly! |
Sounds good! Just added some more automated testing as well so that should help a bit. After I merge that, I'll work on wrapping up the big change set and let yo u know. Should be about 30 minutes! |
Just merged! You should be good to go. Thank you! |
The functions are moved out in #57 ! It'll take a lot longer to find every function call and reorder it, but that can be more incremental as different parts of the code base get updates! |
Thank you! |
Currently, much of the logic is stored in anonymous functions within struct definitions by overloading
getproperty
. This does allow OOP style code withscene.method()
calls but it has two drawbacks:init(::Main)
in the stacktrace instead of a gensymed string of characters.if s == :init ... elseif.. elseif...
on every get property call. Using normal method calls allows multiple dispatch to do its thing and resolve the correct function, inline where appropriate, etc.You could solve the first problem by just pulling these anonymous functions out, giving them names, and then still using
get_property
to dispatch to the correct function. Or you could go all the way and remove the OOP style and mayb see a performance benefit.Anyway, I'm happy to do the work, but I wouldn't want to do such a major refactor without checking on the direction you'd like to go.
The text was updated successfully, but these errors were encountered: