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: 7526 Reporter: domsj Status: acknowledged (set by @dra27 on 2017-05-07T08:29:56Z) Resolution: open Priority: normal Severity: feature Version: 4.03.0 Category: language features Tags: junior_job
Bug description
The compiler currently support the following warning:
51
Warning on non-tail calls if @tailcall present.
I think it would make sense to have another warning which turns the logic around:
give a warning for every non-tail call, unless the user explicitly chooses to suppress the warning (using e.g. an attribute [@stackcall]).
(of course this will be most useful if #7525 is fixed too)
The text was updated successfully, but these errors were encountered:
Definitely not a "Major" issue. Marking as a feature request.
My opinion is that the proposal is not a great idea. Warnings are supposed to help enforce good coding style and catch potential errors. I don't think that any realistic project will be written in a style where all non-tail calls should be marked explicitly. Non-tail calls are not intrinsically "bad", and are actually very common; having to mark all of them would add too much noise.
So I propose to close the ticket, unless someone feels strongly about it.
Ok, this a bit less extreme, but still, non-tail recursion is the standard way to navigate on recursive data structures. I'm personally not in favor of adding a warning to discourage this style, esp. considering that its specification and implementation would not be straightforward (one needs to distinguish "recursive calls" from others) and would necessary be somehow imperfect (a "recursive" call could be hidden in various ways).
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: 7526
Reporter: domsj
Status: acknowledged (set by @dra27 on 2017-05-07T08:29:56Z)
Resolution: open
Priority: normal
Severity: feature
Version: 4.03.0
Category: language features
Tags: junior_job
Bug description
The compiler currently support the following warning:
51
Warning on non-tail calls if @tailcall present.
I think it would make sense to have another warning which turns the logic around:
give a warning for every non-tail call, unless the user explicitly chooses to suppress the warning (using e.g. an attribute [@stackcall]).
(of course this will be most useful if #7525 is fixed too)
The text was updated successfully, but these errors were encountered: