exercism / fsharp

Exercism exercises in F#.
https://exercism.org/tracks/fsharp
MIT License
109 stars 97 forks source link

Update instructions for lucians-luscious-lasagna with datatype #1268

Open s-praveen-kumar opened 1 month ago

s-praveen-kumar commented 1 month ago

This concept introduces datatypes, both type inference and explicit type annotation is covered. As a beginner I felt really confused as to what type should I annotate my functions with and is it even needed. (I was trying uint and was constantly getting lots of errors). Hence adding a note on the type expectation for future learners.

github-actions[bot] commented 1 month ago

Hello. Thanks for opening a PR on Exercism 🙂

We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in.

You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch.

If you're interested in learning more about this auto-responder, please read this blog post.


Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.

ErikSchierboom commented 1 month ago

The introduction has this section:

Bindings are defined using the let keyword. Specifying a binding's type is optional for most bindings, as F#'s type inference can usually infer the type based on their value. A binding looks like this:

Your argument is that this is not enough to go on?

s-praveen-kumar commented 1 month ago

Hi @ErikSchierboom My point was, the learning material introduces both type inference and explicit type annotation. But I was not sure which one to use for the exercise.

At least when I attempted as a beginner, I was annotating different types and was getting error messages.

ErikSchierboom commented 1 month ago

Makes sense. I don't have much time now, but I'll come back to this!