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

Feature proposal: provide type specialization function for boolean and give an warning when a generic comparison is used #7044

Closed
vicuna opened this issue Nov 16, 2015 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Nov 16, 2015

Original bug ID: 7044
Reporter: @bobzhang
Status: acknowledged (set by @damiendoligez on 2017-04-13T11:07:52Z)
Resolution: open
Priority: normal
Severity: feature
Category: typing

Bug description

Currently only int, float, string, nativeint, int32, int64 are specialized, it would be nice to also specialize boolean.
In some cases, using generic comparison function is un-intentional, it would be nice to have a warning for this (at least abstract type comparison)

@github-actions
Copy link

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

@github-actions github-actions bot added the Stale label May 11, 2020
@stedolan
Copy link
Contributor

stedolan commented May 12, 2020

The first feature-wish is already implemented: comparison functions are specialised for booleans. (The specialisation also works for user-defined types with only constant constructors).

The second feature-wish (warnings on generic compare) is being discussed at #7524

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants