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

F# So Far

510e0501c737af4df361f945fc295f63?s=47 Jake Trent
January 05, 2017

F# So Far

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

510e0501c737af4df361f945fc295f63?s=128

Jake Trent

January 05, 2017
Tweet

More Decks by Jake Trent

Other Decks in Technology

Transcript

  1. Our Experience So far With F# Matt & Jake

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

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

    - .Net ecosystem & expertise - Appeal of F# when coming to .Net - Strong types
  4. 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
  5. Deployment - Pre-existing Windows servers - server-farm for listeners -

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

    messaging - logging - settings - postgres
  7. Abstractions - Mostly just functions - Didn’t use classes except

    for interop - No IoC container
  8. Tooling - Visual Studio - F# Power Tools are great

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

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

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

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

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

    \m/ - Good Google hits - Still growing in our proficiency - Language still has untapped potential
  14. 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
  15. 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
  16. IGHT! Thank you