Skip to content

remove some underscores#25615

Merged
JeffBezanson merged 3 commits intomasterfrom
jb/underscoredeps
Jan 18, 2018
Merged

remove some underscores#25615
JeffBezanson merged 3 commits intomasterfrom
jb/underscoredeps

Conversation

@JeffBezanson
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

The function has the method.

@vtjnash
Copy link
Copy Markdown
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
Copy Markdown
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