Upgrade to Pro — share decks privately, control downloads, hide ads and more …

F# So Far

Jake Trent
January 05, 2017

F# So Far

A few tidbits about our experience building our first couple subsystems in F#.

Jake Trent

January 05, 2017
Tweet

More Decks by Jake Trent

Other Decks in Technology

Transcript

  1. What We’re Building - Prism global nav BC - ~8

    listeners - 1 publisher - 1 api
  2. Why F# for us? - Like functional programming, want more

    - .Net ecosystem & expertise - Appeal of F# when coming to .Net - Strong types
  3. The Language - Syntax is different than most imperative -

    Took days to grok basic syntax - Felt productive w/in a few weeks - Can use all of .Net framework - Interop sometimes awkward - TDD is great - Light stubs, no explicit interfaces
  4. Deployment - Pre-existing Windows servers - server-farm for listeners -

    internal-tools for api - Templates exist for TeamCity - Operationally equivalent w/ all other .Net warez
  5. Shared Libs - Can use all PS .Net libraries -

    messaging - logging - settings - postgres
  6. Tooling - Visual Studio - F# Power Tools are great

    - Rename, import, navigate to - ReSharper mostly absent - Weak refactorings - F# dotnetcore is not ready for prod
  7. Dynamic Data - www.youneedlotsoftypes.com - Painful in test - Partial

    stubs - Incomplete request bodies - Duck typing supposedly possible
  8. Type Inference - Nice to not have to write out

    all types - Sometimes inference gets confused - Have to annotate - Later can remove
  9. Code Organization - Modules group functions - Trying different ways

    to organize types - Forward-only compiler - Still getting better
  10. Quirfuffles - Just go add an assemblyRedirect - Just recompile

    src to make ur tests happy - Just restart Visual Studio
  11. Learning - Some strong resources - fsharpforfunandprofit.com - Pluralsight vids

    \m/ - Good Google hits - Still growing in our proficiency - Language still has untapped potential
  12. Who might like F#? Likes FP and… - .Net -

    ops equivalent, all libs - Strong types - no wild dynamic code, sum types - Safety - immutability by default, total functions - Type inference - modern convenience - Expressive functional constructs - pipes, function composition, auto curry, pattern matching
  13. What now? - Finish Prism BC - Determine if there’s

    enough org interest to support this and future F# projects - Move F# from “investigate” to “avoid” or “adopt” - Profit