Live data from Hacker News

What's New in F# 4.1? [video]

channel9.msdn.com

11–20 of 65 posts

Re: What's New in F# 4.1? [video]

#13
post #7

Wait what, doing this as an alias type ProductId = ProductId of int Meant it allocated an instance on the heap for it before 4.1? Wow.

That isn't actually an alias. That is constructing a single-case discriminated union. DUs are compiled into classes and have a few things automatic equality. Generally speaking, it's better to use Units of Measure[0] when you want some compile-time semantics around numeric literals, as these don't incur the performance penalty of creating a class. [0]: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/lang...

Yeah I realize there are more efficient aliases, but even so - just defaulting immutable data structures with only primitive types in them to cretae reference types feels like a massive foot gun performance wise. I couldn't imagine doing C# without value types, so for F# where things are usually more immutable, it has to be painful if e.g. a normal point(x,y) record is a class...

Re: What's New in F# 4.1? [video]

#14
I'm interested in .NET ecosystem languages, as well as functional programming. How is the parsing and meta-programming toolset? How easy or hard would it be for me to implement a subset of F# that only allows pure functions?

Re: What's New in F# 4.1? [video]

#15

I'm interested in .NET ecosystem languages, as well as functional programming. How is the parsing and meta-programming toolset? How easy or hard would it be for me to implement a subset of F# that only allows pure functions?

Very strong on the parsing front - FSharp.Data contains parsers and type providers for a variety of common formats and FParsec is a mature parser combinators library.

Re: What's New in F# 4.1? [video]

#16

I'm interested in .NET ecosystem languages, as well as functional programming. How is the parsing and meta-programming toolset? How easy or hard would it be for me to implement a subset of F# that only allows pure functions?

Very poor. You would pretty much have to build a language from scratch. I am working on doing that with a language called emly, supports effect tracking as opposed to haskell style purity. I am having to basicly do everything from scratch.

Re: What's New in F# 4.1? [video]

#17

I'm interested in .NET ecosystem languages, as well as functional programming. How is the parsing and meta-programming toolset? How easy or hard would it be for me to implement a subset of F# that only allows pure functions?

Very strong on the parsing front - FSharp.Data contains parsers and type providers for a variety of common formats and FParsec is a mature parser combinators library.

FParsec is fantastic. I have implemented a parser that supports a indentation based language in it. FParsec makes it very productive, and very fun.

Re: What's New in F# 4.1? [video]

#18

I'm interested in .NET ecosystem languages, as well as functional programming. How is the parsing and meta-programming toolset? How easy or hard would it be for me to implement a subset of F# that only allows pure functions?

If you wanted to create a version of F# that only allows pure functions, your best option is probably to modify the F# compiler (which is open source). However, that sounds like something that might not be all that useful.

A more useful thing could potentially be to use the "F# Compiler Service" (which is the compiler API, exposed via a nice F# library) and create some tool that checks purity. I think many people might actually be interested in something like this.

Re: What's New in F# 4.1? [video]

#20
While it is great to see all those new features appearing in F# 4.1, the video gives a very narrow perspective on "what is new in F#" - it is a video about new language features in 4.1 and so this is to be expected - but if I was to list "what is new in F# in 2016", large portion of the list would include recent community contributions. Three recent projects are:

* http://fable.io, which is a modern F# to JavaScript compiler that lets you build Elm-style apps, access React and all that fun

* http://ionide.io which is an F# integration for Atom and VS Code that is doing amazing work towards bringing F# to a fully cross-platform ecosystem

* http://notebooks.azure.com which is (very new) free Microsoft-hosted Jupyter Notebook service that provides support for the usual suspects (R and Python), but also ships with great F# support out-of-the-box

In other words, I think the language is way ahead of the libraries and tooling - there is so much more that can be done (and is being done) using F# as-is!

Post reply on HN