Now the FSharp v1 has gone into Beta it's time to ask about vNext.
The FSharp language spec defines the following reserved keywords:
atomic break checked component const constraint constructor
continue eager fixed fori functor include
method mixin object parallel params process protected pure
sealed tailcall trait virtual volatile
which of these would you like to see implemented and why?
One keyword per answer please.
I'm somehow not able to follow your link, but in case
atomic
applies to builtin software transactional memory, this is my favorite.trait, assuming trait is something like Scala traits.
Good question but hard to answer. You can't guess exactly the purpose of each reserved keyword, right?
From my perspective, I could see some useful use cases for
fixed
(fixed size buffers).I'd vote for
eager
, if it meant that evaluation was lazy by default (like in Haskell, but unlike current F#).My vote is for tailcall.
If I understand the intention correctly this would be a keyword to mark recursive functions the author would intend to be tail recursive. If for whatever reason the compiler cannot comply, a diagnostic message can be of great help.
As it stands now if you fail to structure your recursive function properly the first time you will be informed about this is the StackOverflow exception (No pan intended)