Hacker News new | past | comments | ask | show | jobs | submit login

While these are nice... Are there no headline features? Macros or something?



It is kind of funny that F# 4.0 got to the top of Hacker news while F# 3.0 with the type providers (which is an amazing innovation, if you ask me) didn't get that much publicity when it came out.

I think it's just a matter of timing. Now that the F# community is getting bigger (see number of user groups at http://c4fsharp.net), more stable (see the F# Foundation http://foundation.fsharp.org), and Microsoft is becoming more open (reinforcing the already much more open F# space), it is just a good time for looking into F#. And F# 4.0 announcement is a good excuse for that :-).

Though F# 4.0 is the first version of the language designed and developed in a fully open way, which is pretty amazing change - and more important than many language features that could be added to F#.


F# 4.0 makes me excited to be using the language even more. I just started learning back in December after not really enjoying my Python learning experience and have found F# to be such a joy. Your book is one of three at my desk. I've done about 8 years on the .NET stack and Microsoft as a whole has really impressed me these past couple years.

Anyway, thanks for all the work you have put into making the F# community one that is thriving and active! I see your name everywhere when I'm Googling for F# stuff and it's obvious you are one of those 20-percenters doing 80-percent of the work!


There is a lot more details on the MSDN blogs:

http://blogs.msdn.com/b/dotnet/archive/2015/04/29/rounding-o...

http://blogs.msdn.com/b/fsharpteam/archive/2014/11/12/announ...

For me the most welcome change is the vastly improved consistency of the Seq/List/Array APIs.


"The .NET framework supports up to 32-dimensional arrays, but in the past F# only supported use of up to rank-4 arrays. Not only were arrays of rank 5+ not possible to create and manipulate from F# code, the compiler could sometimes fail to consume external libraries which relied on high-dimensional arrays.

This is now fixed. Although there is not yet support for creating and manipulating high-rank arrays, the compiler will now properly handle these types up to rank-32."

Has anyone here ever used "high-rank" arrays? The deepest I've ever gone was 4 for a lookup table, but I'm wondering what the use-case is for super high depth arrays as well as why there is a limit at all.


I contributed the fix for the high-ranking array support.

The main reason for the fix was because F# pre-4.0 can't reference overloaded methods where one or more of the overloads has one or more parameters which is an array of rank 5 or more. I had a 3rd party DLL I wanted to reference, where a class had generic overloads for all of the array ranks, e.g.,:

    MyClass.Foo(T[])
    MyClass.Foo(T[,])
    ...
    MyClass.Foo(T[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,])
Even though I was only trying to use MyClass.Foo(T[]), the F# compiler's overload resolution failed due to the presence of the higher-ranked array types.

I'm not planning to use such arrays any time soon, but I wanted to make sure that if other code was using these arrays I could reference it from F#.


Doesn't seem so. Just a good ol' fashioned incremental update.


Ahh, the benefits of a nice stable language with no breaking changes.


C#'s added tons of stuff without breaking changes, right?

And you could always feature gate them if you needed to have syntax breaks.


The whole article is about features added. The first point is even about improvements to macros.


Unfortunately F# doesn't really have macro support... "working with expression trees is becoming easier than ever" but you can't actually unquote/eval an arbitrary expression tree.

The only purpose I can see for expression trees is implementing a DSL with F# syntax.


Its not possible out of the box, but there are several community libraries to eval quotations[0].

Shame on whoever downvoted you. Add knowledge to the discussion instead of downvoting someone you disagree with. [0] http://stackoverflow.com/questions/849416/evaluate-quoted-ex...


We must be taking about different things, as F# hasn't had macros and thus cannot get improvements to them.

Quoted code is nice, but it's not a real substitution real macros.


Pre-processor macros...


It doesn't have those either, does it? Just basic conditional flags like C#. Or can you #define FOO bar?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: