I suggest you ...

Add tail call elimination to the C# compiler

Sometimes algorithms can be expressed far more elegantly in a tail-recursive form. The problem with that is the memory footprint, and possibly overflowing the stack. Though the 64bit JIT'er may sometimes decide to optimise the tail call, there are no guarantees, leaving you with no choice than to re-write the algorithm, avoiding tail calls. Having the compiler eliminate tail calls would let developers express algorithms in different ways, which may be more suited for the problem, while also helping developers who are not aware that their tail recursive algorithms may be problematic.

6 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Martijn HoekstraMartijn Hoekstra shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base