James Hugard

My feedback

  1. 63 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  F# Language  ·  Flag idea as inappropriate…  ·  Admin →
    James Hugard supported this idea  · 
  2. 133 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    10 comments  ·  F# Language  ·  Flag idea as inappropriate…  ·  Admin →
    James Hugard supported this idea  · 
  3. 59 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    8 comments  ·  F# Language  ·  Flag idea as inappropriate…  ·  Admin →
    James Hugard supported this idea  · 
  4. 311 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    23 comments  ·  F# Language  ·  Flag idea as inappropriate…  ·  Admin →

    I am generally in favour of addressing this in F# 4.x+. I would want seq { .. } and async { … } tailcalls to also be addressed.

    A more detailed design is needed and some trialling would be great. Jack’s work is a great start. However, this is not an easy piece of work to do in a non-invasive way and my own experiments in this area have not yet led to something I feel confident to include in the F# language design.

    An implementation and testing would need to be provided by someone in the F# community (possibly including Microsoft or Microsoft Research, though not limited to them).

    Currently, initial implementations of approved language design can be submitted as pull requests to the appropriate branch of https://github.com/Microsoft/visualfsharp. See http://fsharp.github.io/2014/06/18/fsharp-contributions.html for info on how to contribute to the F# language/core library design

    I encourage you to consider continue…

    James Hugard supported this idea  · 
    James Hugard commented  · 

    I'm in agreement with Jack Pappas: use neither a keyword nor attribute; simply always issue a warning. In other words, relax the feature request to be:

    "F# compiler emits a warning at each non-tail recursive call site where a function is calling itself or some other function defined within a group of mutually-recursive functions."

    It is obviously bad practice, in general, to make non-tail calls to oneself or one's siblings due to the potential of a stack overflow. Therefore, such usage should be strongly discouraged by default and not only when a specific keyword modifier or attribute is supplied. Doubly so because beginners are more likely to make mistakes here and not even know to use a modifier or attribute as a compiler assist.

    For cases where one accepts the risks, the warning could easily be disabled.

    The documentation for that warning, though, would probably run to the long side; e.g., explaining how one could make the code tailcall friendly.

Feedback and Knowledge Base