News for hackers. Stuff that matters.
Re:F# 4.1 and Visual F# Tools for Visual Studio 2017 by phillipcarter on Tuesday March 07, 2017 @06:21PM (#13816207)
> Is F# a good alternative to C# for writing purely object-oriented code?

Yes! F# is perfectly suitable for OO code, and supports all the same features that C# and VB do, plus Object Expressions, which are a really cool way to implement an interface in an ad-hoc way.

You can learn more here: https://fsharpforfunandprofit.com/series/object-oriented-pro...

Lots of folks in the F# community would encourage you to adopt a functional pattern (as I would as well), but since so much mindshare in the world is currently surrounding object orientation, I think it's great to use F# for OO code and slowly start to sneak in functional patterns. F# is a very "clean" language in that regard.

> One more question. I work at a place with a very restrictive firewall. F# 3 projects worked fine, but with F# 4 the build fails to download nuget packages. Is there a way to use the latest version without Internet connection? I can download anything from microsoft.com, as that site is whitelisted, but nuget.org is not.

Hmmmm. You should be able to build F# 4.1 projects in VS 2017 without an internet connection, but it currently does take a dependency on System.ValueTuple to support struct tuples. This is a point-in-time problem that C# shares as well, because System.ValueTuple is not in the .NET Framework yet. It will be in a future .NET Framework release. This shouldn't limit you, though - you can still do anything in-box, just without using struct tuples.

Naturally, anything involving NuGet packages will be off-limits in your case. So that does cut you off from some of the awesome community packages out there. Have you considered hosting an internal NuGet feed with a package cache so that you're not limited in this way? A lot of companies do this.

Re:F# 4.1 and Visual F# Tools for Visual Studio 2017 by dgudkov on Tuesday March 07, 2017 @09:27PM (#13817327)
>supports all the same features that C# and VB do

My understanding is that while F# indeed supports almost all OOP paradigms nevertheless partial classes are not supported in F#. Do I miss something?

Re:F# 4.1 and Visual F# Tools for Visual Studio 2017 by tarmil on Wednesday March 08, 2017 @02:24PM (#13822877)
No you're right, partial classes are not supported.