Is there any note on if F# will gain concepts/type classes?
I don’t know, but I think this GitHub issue will probably give you the current status and background on this point https://github.com/fsharp/fslang-suggestions/issues/243 Update: the issue is tagged await-csharp-alignment, which is probably the relevant status.
Fable 3: F# to JavaScript compiler
121–130 of 131 posts
Re: Fable 3: F# to JavaScript compiler
#122Does anybody here use F# in a Linux shop? I'm generally keen on the more functional languages, but have tended to avoid F# under the assumption that if I use F# I'll probably also end up needing to use Windows to get the most out of it (or get a job using it).
Re: Fable 3: F# to JavaScript compiler
#123Earlier quoted context omitted.
Can you explain the interop a bit more? I’ve been looking into an F# job. Having a functional background, the language looks nice, but I’m wondering about the ecosystem. Can you not use .Net libraries as easily as you can from C#?
Yes. Typically interop is very straightforward. You look in the api docs and copy paste. Example here is the String doc[1]. Way down you see all the methods. Some of the methods have overloads (multiple variants). Pretty straightforward here. (E.g. `"mystring".Contains("ring")`) Where it gets more verbose and finicky is when the API takes a C# callback. Even more complex is if it’s asynchronous so it takes a C# callb…
Re: Fable 3: F# to JavaScript compiler
#124Does anybody here use F# in a Linux shop? I'm generally keen on the more functional languages, but have tended to avoid F# under the assumption that if I use F# I'll probably also end up needing to use Windows to get the most out of it (or get a job using it).
Re: Fable 3: F# to JavaScript compiler
#125Fable isn't just for view logic. Fable is also really handy for writing puzzle solvers/generators for the browser. I used it in https://vowels.io while using regular preact/js for the views. I found that keeping the fable stuff isolated to lib code gave me less friction.
Nice site. I liked the game, I was embarrassingly slow though
Re: Fable 3: F# to JavaScript compiler
#126Earlier quoted context omitted.
Can you explain the interop a bit more? I’ve been looking into an F# job. Having a functional background, the language looks nice, but I’m wondering about the ecosystem. Can you not use .Net libraries as easily as you can from C#?
Yes. Typically interop is very straightforward. You look in the api docs and copy paste. Example here is the String doc[1]. Way down you see all the methods. Some of the methods have overloads (multiple variants). Pretty straightforward here. (E.g. `"mystring".Contains("ring")`) Where it gets more verbose and finicky is when the API takes a C# callback. Even more complex is if it’s asynchronous so it takes a C# callb…
Re: Fable 3: F# to JavaScript compiler
#127Earlier quoted context omitted.
Yes. Typically interop is very straightforward. You look in the api docs and copy paste. Example here is the String doc[1]. Way down you see all the methods. Some of the methods have overloads (multiple variants). Pretty straightforward here. (E.g. `"mystring".Contains("ring")`) Where it gets more verbose and finicky is when the API takes a C# callback. Even more complex is if it’s asynchronous so it takes a C# callb…
I think it will get better in F# 5.1, which adds native C# Task support... https://github.com/fsharp/fslang-design/blob/master/RFCs/FS-...
https://www.nuget.org/packages/TaskBuilder.fs/ https://github.com/rspeele/TaskBuilder.fs
Re: Fable 3: F# to JavaScript compiler
#128Re: Fable 3: F# to JavaScript compiler
#129Re: Fable 3: F# to JavaScript compiler
#130Fable isn't just for view logic. Fable is also really handy for writing puzzle solvers/generators for the browser. I used it in https://vowels.io while using regular preact/js for the views. I found that keeping the fable stuff isolated to lib code gave me less friction.