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

change which to return rather than show #5646

Merged
merged 1 commit into from
Feb 6, 2014

Conversation

WestleyArgentum
Copy link
Member

This is in response to discussion in #5566. I would be happy with either being merged :)

@StefanKarpinski
Copy link
Sponsor Member

Yes, this is much better.

@JeffBezanson
Copy link
Sponsor Member

It looks to me like whicht should throw the exception, then let which inherit that behavior.

@WestleyArgentum
Copy link
Member Author

I thought so too, but I don't see a nice way to generate a MethodError with just arg types (and I don't know of a more appropriate error).

@WestleyArgentum
Copy link
Member Author

Maybe whicht throws an ArgumentError, then which catches it and throws a MethodError?

@JeffBezanson
Copy link
Sponsor Member

Hmm that is a good point.

@JeffBezanson
Copy link
Sponsor Member

I think the answer is that whicht is redundant with methods and is not needed anyway.

JeffBezanson added a commit that referenced this pull request Feb 6, 2014
change which to return rather than show
@JeffBezanson JeffBezanson merged commit 31ecf33 into JuliaLang:master Feb 6, 2014
@StefanKarpinski
Copy link
Sponsor Member

I agree that whicht should go away. I'd also like to see all the function that take a generic function and a signature rationalized to have similar signatures. As it is, some of them take a tuple of argument types, some of them are varargs and take the types as arguments and some of them take a tuple of argument values while others take a tuple of argument values. In other words, it's an inconsistent shitshow.

@JeffBezanson
Copy link
Sponsor Member

Examples? The only cases I'm aware of are which, which takes argument values as varargs, and every other function takes a tuple of types.

@JeffBezanson
Copy link
Sponsor Member

This convention (if it's worthy of that term) is also used by method_exists (type tuple) and applicable (varargs values).

@StefanKarpinski
Copy link
Sponsor Member

Perhaps I was overestimating the variety. If we're close to having consistent interfaces, that's great.

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

Successfully merging this pull request may close these issues.

3 participants