You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 7524 Reporter: modlfo Status: acknowledged (set by @dra27 on 2017-05-02T10:08:27Z) Resolution: open Priority: normal Severity: minor Category: typing Related to:#3921#7502
Bug description
This is a proposal/request for creating a warning that will be trigger when using '=' on any value that is not immediate (like lists, records).
The main motivation is to avoid problems as the ones described in the reports 0003921, 0007502.
We were also affected in our product by this behavior. The problem that we had was that an algorithm using 'compare a b = 0' was changed to 'a = b'. This produced a big performance degradation since we were not aware that '=' didn't performed physical comparison.
When enabling this warning new programmers will be notified of this behavior therefore avoiding the unintended consequence.
The text was updated successfully, but these errors were encountered:
It's hard at the moment to imagine our being able to turn this warning on by default, I think, so the benefit to new users may be harder to achieve. That doesn't detract from the benefit of having the warning, though.
I just one to +1 this issue (even when I reported it originally). We recently got bitten again by this problem: A piece of code was changed to use = and we got a really bad slowdown in a function that was rarely used to be noticed. But when used, it could take 20 minutes instead of taking seconds.
This warning would be very useful to avoid these kind of mistakes made by any new OCaml programmer that joins our team.
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.
Original bug ID: 7524
Reporter: modlfo
Status: acknowledged (set by @dra27 on 2017-05-02T10:08:27Z)
Resolution: open
Priority: normal
Severity: minor
Category: typing
Related to: #3921 #7502
Bug description
This is a proposal/request for creating a warning that will be trigger when using '=' on any value that is not immediate (like lists, records).
The main motivation is to avoid problems as the ones described in the reports 0003921, 0007502.
We were also affected in our product by this behavior. The problem that we had was that an algorithm using 'compare a b = 0' was changed to 'a = b'. This produced a big performance degradation since we were not aware that '=' didn't performed physical comparison.
When enabling this warning new programmers will be notified of this behavior therefore avoiding the unintended consequence.
The text was updated successfully, but these errors were encountered: