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

Polyglot Programming DC Intro

Polyglot Programming DC Intro

Why be a polyglot? This is why! :)

Jess Szmajda

June 04, 2014
Tweet

More Decks by Jess Szmajda

Other Decks in Technology

Transcript

  1. -Neal Ford “Use the tool that’s most keenly shaped for

    the problem you’re trying to solve”
  2. Factorial n! = n * (n - 1) * (n

    - 2) …
 0! = 1
  3. Factorial n! = n * (n - 1) * (n

    - 2) …
 0! = 1 1 public int factorial(int n) {! 2 int result = 1;! 3 for (int i = 1; i <= n; i++) {! 4 result = result * i;! 5 }! 6 return result;! 7 }
  4. Factorial n! = n * (n - 1) * (n

    - 2) …
 0! = 1 1 def fact(n)! 2 return 1 if n == 0! 3 1.upto(n).inject(:*)! 4 end
  5. Factorial n! = n * (n - 1) * (n

    - 2) …
 0! = 1 1 fact :: Int -> Int! 2 fact 0 = 1! 3 fact n = n * fact (n-1)
  6. Game of Life 1 def survives(currently_alive, n_neigh)! 2 return true

    if n_neigh == 3! 3 return true if currently_alive && n_neigh == 2! 4 false! 5 end
  7. Game of Life 1 data Aliveness = Alive | Dead!

    2 ! 3 survives :: Aliveness -> Int -> Aliveness! 4 survives _ 3 = Alive! 5 survives Alive 2 = Alive! 6 survives _ _ = Dead
  8. A Different, yet no less Horrible Classification System Stateful Concurrent

    Domain-Specific Dynamically vs Statically Typed Proprietary vs. Open Source
  9. Come Talk! Explain a language or framework Share what you

    learned by trying something new Dig deep into something interesting Compare some things and share Share your favorite tools Anything else interesting to programmers!
  10. I’m Josh Szmajda ! @jszmajda ! CTO at , home

    of ! Passionate Polyglot! Thanks!