Related to #1102, this issue could act as an overall list for all the issues relating to error reporting from the compiler. I'll start the ball rolling by adding the ones mentioned in that issue plus a few more.
<- operator on non mutable bindings (#1110)= (#1214), instead of ; as collection separator (#1120)If you have ideas for other error messages, please adhere to the following standard for new issues: -
a. What - reproduction of the error through a code snippet and compiler error / warning.
b. Why - why the current compiler error / warning is insufficient.
c. How - how you would improve the current error / warning with an alternative example.
i just want to add a ref to ocaml error reporting improvements, it's really nice
Another good source for ideas of potential issues: http://fsharpforfunandprofit.com/troubleshooting-fsharp/
Missing method XYFooBar --> may be you need an FSharp.Core redirect
@vilinski can you raise an issue for this and maybe give a concrete example of where this happens?
That's a good list.
I'd like to see each of the issues above have a few lines of justification addressing why we believe the error message is specifically a problem for beginners (e.g. they might be coming with expectations from Python or C#)
@dsyme done.
@isaacabraham One error you might like to consider is a much better error message when a C# or C++ programmer uses !expr to mean "not". F# interprets that at "dereference a ref cell".
Now, as of F# 4.0, the use of explicit ref cells is far less common because implicit promotion of let mutable is now so well supported. We could probably even consider deprecating the use of !expr as the default syntax and instead ask people to either use not expr or expr.Value.
But even without going that far, we could surely improve the error message for a misuse of !expr in the common case, asking people to use not expr instead (perhaps with parentheses as in not (f x))
Can I leave it to you to add the specific issue for this?
@forki what's the status of #1109 and #1218? Any way we can unblock these?
I need help from @dsyme - I already contacted him
2016-08-15 18:46 GMT+02:00 Isaac Abraham [email protected]:
@forki https://github.com/forki what's the status of #1109
https://github.com/Microsoft/visualfsharp/issues/1109 and #1218
https://github.com/Microsoft/visualfsharp/issues/1218? Any way we can
unblock these?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/visualfsharp/issues/1103#issuecomment-239856456,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNAYSq9iFBEHF3byxTkmp-oimwQTFks5qgJfqgaJpZM4IOdcd
.
Just done a quick review here. There are a few issues that seem to me to be "up for grabs" i.e. there's been a discussion on the issue and there seems to be consensus on what the outcome should be - someone "just" needs to do the work.
There are also some that need some discussion to review them and decide the best way forward.
Thanks! Such great progress overall :)
Removing the discussion label as this is really an all-up tracking issue
@enricosada Thanks hundred times for this link:
http://www.chargueraud.org/research/2015/ocaml_errors/ocaml_errors.pdf
This is so true and especially to me as a newbie currently very challenging;
_"In many cases, error messages cannot be interpreted without a sufficiently-precise model of the type
inference algorithm."_
You have to study computer science with a special focus on ML, in order to get a drift about these type issues. I love F-Sharp really a ton and this is by far the most distracting thing to me yet, simply because I often lack any idea how this can be solved.
In truth, I think it starts even with the term "error messages". It should be not an error message only, it should contain an actual solution. Like Elm does that. And Reason and Rust. It seems to get quite standard. Which is, IMHO, overdue since decades.
I like to translate these solutions and I suggest a public announcement like in the form of a blog/twitter/slack post, which invites to the public contribution on this issue.
Thanks a lot ^-^
@ShalokShalom look at the "Contributing" part. That's what we already aim for. To give a hint on how to fix things
Link #5114
@isaacabraham Can you add #5114 to the original issue please?
Done
Most helpful comment
i just want to add a ref to ocaml error reporting improvements, it's really nice