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

remove some underscores #25615

Merged
merged 3 commits into from
Jan 18, 2018
Merged

remove some underscores #25615

merged 3 commits into from
Jan 18, 2018

Conversation

JeffBezanson
Copy link
Member

Part of #20402.

  • deprecate catch_stacktrace
  • rename method_exists to hasmethod
  • rename object_id to objectid

@JeffBezanson JeffBezanson added the deprecation This change introduces or involves a deprecation label Jan 17, 2018
Copy link
Member

@ararslan ararslan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks! I especially like hasmethod.

@ararslan ararslan mentioned this pull request Jan 17, 2018
19 tasks
@nalimilan
Copy link
Member

+1 in general, but I'm not sure I like hasmethod: who's the subject of "has", given that there are multiple types?

@JeffBezanson
Copy link
Member Author

The function has the method.

@vtjnash
Copy link
Member

vtjnash commented Jan 17, 2018

The function has the method.

Actually, I agree this is a bit weird. Functions don't have methods. The global MethodTables has methods, with symmetric dispatch across all arguments (including the first argument, which in many cases is a Function).

@JeffBezanson
Copy link
Member Author

In generic function systems, functions are traditionally considered sets of methods. True, that's not exactly how it works in julia, but the query hasmethod(f, types) is formulated in those terms.

We could also have a 1-argument version, e.g. hasmethod(Tuple{ftype, argtype}) and I think it might still make sense; you're asking if the system has such a method.

@JeffBezanson JeffBezanson merged commit f82f82f into master Jan 18, 2018
@JeffBezanson JeffBezanson deleted the jb/underscoredeps branch January 18, 2018 21:58
Keno pushed a commit that referenced this pull request Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation This change introduces or involves a deprecation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants