[m-rev.] for review: report an error for obviously redundant functional dependencies
Zoltan Somogyi
zoltan.somogyi at runbox.com
Sat Sep 20 14:47:40 AEST 2025
On Sat, 20 Sep 2025 14:33:03 +1000, Julien Fischer <jfischer at opturion.com> wrote:
> Question for reviewers: should these be warnings rather than errors?
A redundant variable occurence should be a warning, but a misspelt
variable name should be an error (because the correct spelling is missing).
Since the compiler is not telepathic, either is justifable. I think the problem
is rare enough that the choice does not matter that much, but like you,
I prefer it being an error.
> + CommonTypeVarsPieces ++
> + color_as_incorrect([
> + words(choose_number(CommonTypeVars, "occurs", "occur")),
> + words("in both the domain and range of a functional
> dependency.")
I would make two cosmetic changes here. First, I would change the text to say
"both the domain and THE range of THE SAME functional dependency".
Second, I would color as incorrect only the "both the domain and the range"
part.
The diff is otherwise fine.
Zoltan.
More information about the reviews
mailing list