Live data from Hacker News

A Peek into F# 4.1

blogs.msdn.microsoft.com

1–10 of 30 posts

Re: A Peek into F# 4.1

#2
I'm not a fan of the new syntax for struct tuples, struct records, and struct unions. I feel like it could have been avoided with a lesser evil if they had followed the same approach that Scala is using for anonymous functions in the upgrade to 2.12.

Specifically, don't introduce new syntax, but force your users to deal with the fact that your bytecode is now incompatible with previous versions and now requires a new minimum version for the VM. They can recompile...it's not really that big of a deal. It is far more of a big deal to rewrite all of your code than it is to upgrade your VM and recompile.

Re: A Peek into F# 4.1

#3
It's pretty cool being able to get this setup on my Mac and easily play around from the command line. It makes it much more accessible as a language than when it was more closely tied to the Windows/Visual Studio ecosystem.

Re: A Peek into F# 4.1

#4
post #3

It's pretty cool being able to get this setup on my Mac and easily play around from the command line. It makes it much more accessible as a language than when it was more closely tied to the Windows/Visual Studio ecosystem.

I've probably spent more time messing with F# on my Mint laptop than I have on my Windows desktop...

Part of that is that F# doesn't really have the level of tooling that I've come to expect from C# in VS, with ReSharper.

I would like a static analysis tool for F# that tells you when you are doing something that is legal, but dumb, as ReSharper does.

Re: A Peek into F# 4.1

#5

I'm not a fan of the new syntax for struct tuples, struct records, and struct unions. I feel like it could have been avoided with a lesser evil if they had followed the same approach that Scala is using for anonymous functions in the upgrade to 2.12. Specifically, don't introduce new syntax , but force your users to deal with the fact that your bytecode is now incompatible with previous versions and now requires a ne…

I definitely agree with you for tuples especially smaller tuples. As tuples get larger however performance can swing the other way. As someone who codes some F# for my day job it seems that while tuples should be easier in a functional language like F# for backwards compatibility struct tuples will be more awkward to use than in C# 7. I think they should of just bit the bullet for tuples up to a certain size.

For records and unions however I think the attribute is fine. Most of the time for types of more than 3 fields say structs can be worse in performance than classes anyway. Records and unions tend to be assigned more and live longer than tuples most of the time. For unions for obvious reasons structs are not recursive in nature which with unions is required somewhat (see https://msdn.microsoft.com/en-us/library/ms229017%28v=vs.110...). Definitely wouldn't want structs to be the default here.

Re: A Peek into F# 4.1

#6
I wish I could convince more people of the importance of F#. It sits in such a unique place.

Its Ocaml heritage gives it tons of advantages over other functional languages rolled from scratch when it's time to write server or application code, it has a class library equivalent to the Java stdlib behind it, and its focus on data processing has made it a good choice for people doing data science.

Re: A Peek into F# 4.1

#8
post #4
post #3

It's pretty cool being able to get this setup on my Mac and easily play around from the command line. It makes it much more accessible as a language than when it was more closely tied to the Windows/Visual Studio ecosystem.

I've probably spent more time messing with F# on my Mint laptop than I have on my Windows desktop... Part of that is that F# doesn't really have the level of tooling that I've come to expect from C# in VS, with ReSharper. I would like a static analysis tool for F# that tells you when you are doing something that is legal, but dumb, as ReSharper does.

Consider using https://github.com/fsprojects/FSharpLint

I'm not sure if it is integrated to ionide yet.

Re: A Peek into F# 4.1

#9
post #4
post #3

It's pretty cool being able to get this setup on my Mac and easily play around from the command line. It makes it much more accessible as a language than when it was more closely tied to the Windows/Visual Studio ecosystem.

I've probably spent more time messing with F# on my Mint laptop than I have on my Windows desktop... Part of that is that F# doesn't really have the level of tooling that I've come to expect from C# in VS, with ReSharper. I would like a static analysis tool for F# that tells you when you are doing something that is legal, but dumb, as ReSharper does.

On Windows / Visual Studio, consider using https://github.com/fsprojects/VisualFSharpPowerTools which has some abilities similar to Resharper.

Re: A Peek into F# 4.1

#10
post #4
post #3

It's pretty cool being able to get this setup on my Mac and easily play around from the command line. It makes it much more accessible as a language than when it was more closely tied to the Windows/Visual Studio ecosystem.

I've probably spent more time messing with F# on my Mint laptop than I have on my Windows desktop... Part of that is that F# doesn't really have the level of tooling that I've come to expect from C# in VS, with ReSharper. I would like a static analysis tool for F# that tells you when you are doing something that is legal, but dumb, as ReSharper does.

I've also had a great experience with F# power tools, which now provides linting helping me keep the code clean and follow good functional coding practices, especially shorter, simpler functions. And the renaming function it provides is about all the refactoring help I have ever needed. Works great.
Post reply on HN