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

Request: Mark concretely-typed arguments as unusual #366

Open
ParadaCarleton opened this issue May 18, 2023 · 3 comments
Open

Request: Mark concretely-typed arguments as unusual #366

ParadaCarleton opened this issue May 18, 2023 · 3 comments

Comments

@ParadaCarleton
Copy link

e.g. Float64 here:
image

@fredrikekre
Copy link
Member

Why?

@ParadaCarleton ParadaCarleton changed the title Request: Mark concretely-typed fields as unusual Request: Mark concretely-typed arguments as unusual May 19, 2023
@ParadaCarleton
Copy link
Author

Why?

Sorry, made a mistake in the title--this is for function arguments, although it might also apply (to a slightly lesser extent) to fields in a struct.

The reason I'd like a blue squiggly is because new users often make the mistake of overtyping their functions. It's very rare that you actually need a function to only allow Float64s.

@dzhang314
Copy link

I strongly disagree with this suggestion. I write lots of high-performance code (e.g., MultiFloats.jl) that depends on exact bitwise representation, so my functions are correctly and appropriately specialized to concrete types.

Maybe you don't write code like that, and that's fine, but I think this is way too opinionated to turn on in the linter by default.

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