4 ms·
Check out F#, the bastardized yet legitimate child of MSFT. If you like functional languages or would like to try it, give it a whirl! https://dotnet.microso
by whb07 5y ago
Check out F#, the bastardized yet legitimate child of MSFT.
If you like functional languages or would like to try it, give it a whirl!
https://dotnet.microsoft.com/learn/languages/fsharp-hello-world-tutorial/intro https://dotnet.microsoft.com/learn/languages/fsharp-hello-wo...
If you use vscode, highly suggest to use Ionide extension. You’ll be quickly amazed at how smooth it all works.
- yCombLinks 5y agoF# is cool, but definitely not where to start. C# is by far, by far, by far the most popular .net language
- dharmaturtle 5y agoDepends on what OP is familiar with. If they know/like functional programming, I'd recommend F# highly. If not... Yeah go with C#. Then later learn F# because it's absolutely kick ass :)
- raegis 5y agoAn experienced functional programmer can learn F# in a minute, which is fine for console programs. But I tried to write a basic GUI program in F# on Linux and gave up after I reached my googling limit.
- jkulubya 5y agoHave you tried https://github.com/fsprojects/Avalonia.FuncUI https://github.com/fsprojects/Avalonia.FuncUI?
- dharmaturtle 5y agoTo add to the other comment, how about Fabulous? https://github.com/fsprojects/Fabulous https://github.com/fsprojects/Fabulous
- de_keyboard 5y agoC# is more popular but actually harder to learn IMO (although this does depend on your prior experience). C# is huge, but F# achieves more with fewer language constructs. F# can also be transpiled to JavaScript, which is a huge advantage.
- rspeele 5y agoI love F#, it's my #1 favorite language by far. But I code in C# at my day job and I gotta say, while I haven't exactly kept count, it's hard for me to agree that F# has fewer constructs. To be fair, much of that comes from the fact that F# has to do nearly everything C# does for compatibility, and have its own stuff too. It leads to a lot of "wait, which tool do I use for this problem?" questions for newbies. * [<Extension>] methods vs `type X with member ...` extensions * let-bound functions vs static methods vs instance methods * operator overloads vs let-bound operators * curried functions vs multi-parameter functions * modules vs static classes * `exception MyError of string` vs `type MyErrorException(msg) inherit Exception(msg)...` * polymorphic data: interface vs abstract class vs discriminated union * Async vs Task * seq { ... } computation expression vs chain of Seq module operations vs. LINQ methods * Option vs Nullable vs Result * Statically resolved generic vs runtime generic (`^a` vs `'a`) * `for i = 0 to 10` vs `for i in 0..10` * `upcast` vs `:>` and `downcast` vs `:?>` * `function` vs `fun x -> match x with` * .fsi files and the syntax for declarations in them * `let mutable` and `<-` vs `ref` and `:=` * sprintf vs interpolated strings with "%d"-style format specifiers vs interpolated strings with FormattableString format specifiers vs String.Format * Code quotations vs linq-style Expression<Func<...,...>> I am very comfortable with F# today and feel I have a solid grasp on how I like to do things. But when I was introduced to it, I was a little overwhelmed, even though I already had familiarity with C# and with Haskell.
- de_keyboard 5y agoThis is a fair point! Although I was more talking about the language constructs that are used for 90%+ of code, which from my own experience is: * let * discriminated unions * records * lists * seq * async * fun Like all languages people actually use, F# has a long tail of advanced features!
- phillipcarter 5y agoI'd also argue that C# is a worse language to start with than F# if you're coming from Python.