loading...

re: Which is better for teaching? C# or F# VIEW POST

FULL DISCUSSION
 

I'm a big F# fan, so I'd be remiss if I didn't mention that your "boiled down" F# example missed the module and [<EntryPoint>] declarations (unless you're running in an fsx file). :)

I'd agree that F# will fit the mathematician's mind better than C# will. Of course, a lot of the .NET Framework examples assume C#, so being passingly familiar with C#'s syntax will be a benefit to your protegés. So, as BG Adrian said - don't lead with the .NET Framework, lead with "automated mathematics," and bring in the framework when they need to do something the language doesn't handle "natively".

 

Thank you for your suggestions. I will start with real world assignments and bring in whatever is needed from the framework or from Nuget as we go.

I admit that I did cheat a bit with the F# example to state my point. But one of my points is that F# can be easily used for scripting (.fsx) so it is still valid :-)

 

C# can easily be used for scripting also - (.csx)

You can use Xamarin Workbook or VS Code to start teaching your colleagues.

You can just use WriteLine("Hello World"); After you have declared the using statement, which you did not do in your F# example - whence biases.

Anyways, teaching one programming depends on many factors and there must be biases and preferences. People will always resist new ways of doing things until you break that barrier by motivating and influencing them.

Without mincing words, C# is a powerful and wonderful language with many great features - check out C# 6, 7, 7.1 and upcoming version 8. And F# also is a great language. All of them running on a great and powerful platform - .NET or .NET Core.

So if you feel F# will be better for what they will be doing for the company, teach them F#. But is C# will be useful and better for what they will be doing, teach them C#. After all, I do not think is hello world they will be developing for the company.

Consider the prospect of the language, industry support, platforms they run on; how many different types of application you can develop using them. etc.

Code of Conduct Report abuse