Sign in
Log inSign up
Jindřich Ivánek

3 likes

·

915 reads

6 comments

Andrés G. Aragoneses
Andrés G. Aragoneses
Jan 30, 2024

member this.Value = let (ItemId value) = this in value

You lost me here. What is the in keyword and where can I learn more?

1
·
·5 replies
Jindřich Ivánek
Jindřich Ivánek
Author
·Jan 30, 2024

in keyword is shorthand syntax for multiline expression. It's the same as

member this.Value = 
    let (ItemId value) = this
    value

You can learn more here: fsharpforfunandprofit.com/posts/let-use-do

1
·
Andrés G. Aragoneses
Andrés G. Aragoneses
Jan 30, 2024

Jindřich Ivánek how can it be the same as the exact same line but without the in? or is it that this comments system is not showing me EOLs?

·
Jindřich Ivánek
Jindřich Ivánek
Author
·Jan 30, 2024

Andrés G. Aragoneses Yes, comment eats newlines. I edited my comment to show the code properly.

·
Andrés G. Aragoneses
Andrés G. Aragoneses
Jan 30, 2024

Jindřich Ivánek Ok that is more understandable. I think the in keyword maybe deserves an entire blog entry for itself, so if I were you, I would decouple this blog entry from this new potential one (if you're distilling complex topics, it's better to explain them with the most basic elements, not making use of other complex topics).

·
Jindřich Ivánek
Jindřich Ivánek
Author
·Jan 31, 2024

Andrés G. Aragoneses I think it deserve note in the article. I added it. Thanks for the pointer.

1
·