Needs advice
on
Kotlin
F#
and
C#

Hi there. I want to expand my coding toolset. So I want to learn a second backend language besides Kotlin. Kotlin is fantastic. I love it in every aspect, and I think I can never return to Java. And also why should I? It is 100% interoperable with java and can co-exist in every project.

So my question here is. Which language do you think will bring me more joy? I think F#; it is more like Kotlin. Then C# (it's more or like 100% java). But, let's say I learn F#. Is it 100% interoperable like Kotlin? can they live side by side? Can I, then, apply to .NET jr jobs after a while, for example, or is C# the holy cow? I would like to learn .Net.

If it is the worst and only C# is acceptable, then which language should I learn? Dart? Go?

READ LESS
4 upvotes·64.5K views
Replies (3)
Recommends
C#

animefanx1,

First let's get your questions sorted: Which language do you think will bring me more joy?

This you will have to decide for yourself, I am a long time C# developer and have seen it grow into a very compelling platform. The language and I'd compare it more to Kotlin than Java (by a long margin). More on .NET in a bit.

say I learn F#. Is it 100% interoperable like Kotlin?

You can have 100% interop with a caveat, your F# libraries have to implement certain guidance in order to be referenced from C#. Some (dare I say most) of the differences between F# and C# are predicated on language constructs that are not available in C#. For instance F# functions that return Unit.

can they live side by side?

Yes.

Can I, then, apply to .NET jr jobs after a while, for example, or is C# the holy cow?

I don't know if I take your meaning, but let me say this: Learning either C# or F# will likely force you to understand concepts such as garbage collection, primitive types, etc. which apply to all .NET languages, thus a lot of the effort you put into .NET is bound to pay off regardless of your choice.

If it is the worst and only C# is acceptable, then which language should I learn? Dart? Go? You can't go wrong with any of these and I venture to say whether you select C#, F#, Dart or Go as your next adventure, your willingness to learn will take you to try other languages, some which mey not even exist yet!

PS1: .NET is an end to end environment now. With the introduction of Blazor and Razor pages one does not need JavaScript or other browser scripting languages, it even interops with JavaScript. PS2. Microsoft is working on unifying .NET. Soon there will be only one version: .NET 5! Caveat: Some features such as WinForms will still be specific to the windows environment but all of those are likely things you don't need in Mac or Linux

READ MORE
4 upvotes·1 comment·56.3K views
Kranael
Kranael
·
February 8th 2021 at 11:54AM

Ok thanks for the advice - really thanks :-)

Concepts like garbage collection which don't exist in C++, I know and primitive types are also a thing in java. I came from java (suprise ^^) and moved to kotlin because I like that the language is not bound to the jvm ecosystem. Also I'm more productive with less bugs in my code, because clever compiler don't let me assign a null to a variable and some other stuff. Not writing - if (x != null) ... anymore.

The language and I'd compare it more to Kotlin than Java (by a long margin) <-- In which kind? For example the syntax is more Kotlin in F# it has range expression and so on.

Like that: F#

let function1() =

for i in 1 .. 10 do

printf "%d " i

printfn ""

function1()

Kotlin:

for (i in 1..10) {

println(i)

}

And the classic one:

C# and Java really similar

for (int i = 0; i < 5; i++)

{

Console.WriteLine(i);

}

Sry for the syntax here but i would understand why it is more like Kotlin? Or did you mean F# and not C#?

Last question:

You say it can live side by side -> Lets say i know after a long time enough F# would I be able to apply to .NET / C# Jobs? When I say in an Interview yes all fine for me, but you should know I write F# not C# code? Is it acceptable for company's?

I really like the idea from Microsoft to unify all the frameworks so no .NET Core, ASP etc. only .NET 5 :-)

Thank you for your time in advance :-)

·
Reply
Recommends
Kotlin
C#

Exceptional decision to go with Kotlin. For the other story, go full with C#. "is C# the holy cow? Yes it is.". Specially now when netCore is crossplatform and you can build asp.net core applications on Windows, Linux and macOS via Visual Studio Code which is also multiplatform. Nothing will beat C# in the near future. Also, at the end of 2021 Microsoft will release Net 6.0 which will include MAUI.

"For those new to .NET MAUI (standing for .NET Multi-platform App UI), Microsoft says it's "the evolution of Xamarin.Forms extended from mobile to desktop scenarios with UI controls rebuilt from the ground up for performance and extensibility."

So, C# all the way sire!

READ MORE
4 upvotes·56.5K views
View all (3)
Avatar of Kranael