F# to C# and back

I love F#. It was my first language in the dotnet ecosystem coming from Python

As an amateur hobby programmer, I read an article saying that I must learn an OOP language like Java or C# (Peter Norvig - Learn programming in 10 years). Given that I had used several C# based libraries in F#, I thought of learning C# (Did Moshs excellent courses - all three of them in Udemy on C#)

My experiences

1. My natural focus seems to be on verbs and data separately when I listen to instructions - "do this, then do that with the result," As I had been programming in python functions - transforming from input arguments to outputs. Forcing myself to think classes and then most of the functions in static classes with pseudo nouns didn't make sense and pulled me away from the requirements

[All the railway-oriented programming etc did not bias me as I saw them after the experience]

2. After running "async await run synchronously sequential and parallel" - C# async and await seemed cumbersome and rather contrived

3. `Map` and `Iter` on seq list arrays - what ? you dont have it out of the box and I need to use LINQ????

4. Verbose - I ended 1.5-2 times as much code on my application. I rewrote an application just to make sure I learn the language paths. The boiler plate killed me. I did enjoy one part, not having to order stuff though

5. Pattern matching and DUs - recently I started using them. The F# slack is really supportive and I had great mentors who told me to do Exercism. This was good start to actually start using them in my commercial projects

The C# formatting worked smoothly in VS, whereas Fantomas was tough to get to work on VS 2022.

Dont challenge me on words - like Poly morphism Monads Binary trees.... I probably know what they mean but dont know the words :-) as I am self taught by struggle

PS: I have a desktop client application running for more than 6 months 24X7 at several locations in F#. Reliability I havent seen in my earlier Python apps. (Yes... C# may do it too and hence this is a PS and not the main note)


Popular posts from this blog

2022 Books