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

Use new call overloading #134

Closed
tknopp opened this issue Nov 19, 2014 · 7 comments
Closed

Use new call overloading #134

tknopp opened this issue Nov 19, 2014 · 7 comments

Comments

@tknopp
Copy link
Collaborator

tknopp commented Nov 19, 2014

@vtjnash: Hi Jameson, if I get it right with Julia 0.4 we can have constructors even for abstract types. Do you think it would be feasible to get rid of the @ names again? Or did I get this wrong...

@vtjnash
Copy link
Contributor

vtjnash commented Nov 19, 2014

Yes, although, like PyCall, I'll probably wait till later in the release cycle to be breaking compatibility

@tknopp
Copy link
Collaborator Author

tknopp commented Nov 19, 2014

Great, and yes absolutely not a pressing issue as I will not switch to 0.4 dev anyway at this time. So then lets keeps this issue as a reminder.

@tknopp
Copy link
Collaborator Author

tknopp commented May 13, 2016

@vtjnash @timholy: Whats your your current thinking about this issue? I still think we should get rid of the exessive use of the macro syntax in Gtk.jl
Would the change be complicated to accomplish?

@vtjnash
Copy link
Contributor

vtjnash commented May 14, 2016

Should be a straigtforward matter of changing macro to function @ https://github.com/JuliaGraphics/Gtk.jl/blob/master/src/GLib/gtype.jl#L221. I would definitely merge any PRs to fix this.

@tknopp
Copy link
Collaborator Author

tknopp commented May 14, 2016

I tried

        function $einame(args...)
            Expr(:call, $ename, map(esc,args)...)
        end

and

        function $einame(args...)
            call( $ename, map(esc,args)...)
        end

but neither worked. But this might still be because of my still non-existing macro foo.

@fcard
Copy link
Contributor

fcard commented May 14, 2016

@tknopp, esc is a Expr manipulation function, and call is deprecated, so it should probably be...

function $einame(args...)
  $ename(args...)
end

@tknopp
Copy link
Collaborator Author

tknopp commented May 14, 2016

yes thanks, that works. I needed to let the current macro definition stay there because lots of code with Gtk.jl uses the @ syntax. But it seems to be clever anyway to remove the @ syntax a little later in order to not break other packages relying on it.

@tknopp tknopp closed this as completed in d25c711 Jan 5, 2017
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

3 participants