FunScript - F# to Javascript leveraging TypeScript metadata

 FunScript is “a lightweight F# library that lets you rapidly develop single-page web and mobile applications”.

This now has a nice new home page: <funscript.info/>

 It is interesting because:

  1. It compiles F# to JavaScript (see also WebSharper)
  2. It leverages TypeScript metadata to do typed interop with JavaScript libraries through an F# type provider
  3. It supports F# type providers such as FSharp.Data for really smooth working with JSON data.
  4. It supports the usual F# goodness such as async programming, pattern matching, sequence expressions, active patterns, units of measure, regular-coding-free-of-nulls, avoiding ubiquitous “any” types etc.

You can connect to external data sources and call REST APIs with intellisense, produce dashboards using JavaScript visualization libraries and write asynchronous computations easily without explicit callbacks.

Some nice samples:

Charting WorldBank Data (code)

Calling the Movie Database (code)

If you’re interested in using one language on JS client and .NET server it may be worth a look for single page apps. Another excellent alternative is WebSharper.

 

Cheers,

Don