cloudroutine's comments

cloudroutine | 9 years ago | on: A Peek into F# 4.1

Considering the two existing ways to defines structs are

  type S = struct val X:int end
  type [<Struct>] R = val Y:int
it's not new syntax as much as an extension of the contexts where the construct is applicable.

The examples in the blog post aren't in accordance with the RFC as far as type signatures are concerned [1] The tuple decomposition is mixed in with the type sig.

  let getPointFromOffset (point: struct (x, y)) (offset: struct (dx, dy)) = ...
^ is totally wrong

  let getPointFromOffset (struct(x, y) as point) (struct (dx, dy) as offset) = ...
or

  let getPointFromOffset ((x, y): struct(int * int)) ((dx, dy): struct(int * int)) = ...
use the proper syntax, which is consistent with the rest of F#

[1] https://github.com/fsharp/FSharpLangDesign/blob/master/RFCs/...

cloudroutine | 10 years ago | on: Ionide – F# Dev Tools for the Atom Editor

I started out with OCaml too, it's a really easy transition into F#. You can basically cut and paste OCaml code into F#, unless it involves stuff like Functors, first class modules, and polymorphic variants.

Active Patterns are a pretty cool F# feature that OCaml doesn't have. You can do something that's effectively the same with OCaml macros, but those are a lot more tedious.

The F# intellisense and code completion are great productivity enhancers, especially when it comes to working with unfamiliar libraries.

My biggest hurdle in transitioning from OCaml to F# was learning my way around the .Net ecosystem, so it was still a relatively minor one.

If you decide to get into F# and have any questions about it someone on the #fsharp channel on the Functional Programming Slack[1] usually has an answer.

[1] http://fpchat.com/ <- sign up here, invites usually arrive within 24hrs

cloudroutine | 10 years ago | on: Ionide – F# Dev Tools for the Atom Editor

VS Code does not currently support extensions/plugins. The team has confirmed they're coming at some point[1] but we'll need to see how they set it up to determine the best approach to building an F# plugin for it.

Ionide definitely won't be compatible out the gate, but if the API isn't too different we might be able to reuse some of what we've already done.

The best case scenario would be the if plugin system supports dlls so that we could use the FSharp.Compiler.Service directly[2]

[1] http://visualstudio.uservoice.com/forums/293070-visual-studi...

[2] http://fsharp.github.io/FSharp.Compiler.Service/

page 1