O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.
SEVEN LANGUAGES
IN SEVEN WEEKS
Renan Ranelli
Renan Ranelli (Milhouse)
Software Engineer @
Renan Ranelli (Milhouse)
AGENDA
•
Why should I care about learning new languages?
•
A little bit about the languages in the book and how
they compa...
WHO IS THIS TALK FOR
•
You, who is an Object oriented programmer and has
heard about functional programming
•
You, who hav...
1 - WHY SHOULD I CARE?
WHY SHOULD I CARE ?
•
First of all...
•
I Think you should learn programming languages
•
But my opinion probably will not ...
http://blog.golang.org/concurrency-is-not-parallelism
http://blog.golang.org/concurrency-is-not-parallelism
http://blog.golang.org/concurrency-is-not-parallelism
DISCLAIMER:
ALL THE LANGUAGES HERE ARE TURING
COMPLETE
WE WILL A LITTLE ABOUT
•
Ruby
•
Io
•
Prolog
•
Scala
•
Erlang
•
Clojure
•
Haskell
WHAT I AIM TO ACHIEVE
•
I will try to explain what is important when learning a
new programming language
•
I expect to sho...
WE WILL A LITTLE ABOUT
•
Ruby
•
Io
•
Scala
•
Erlang
•
Clojure
•
Haskell
Support for OOP
Support for FP
2 – SELECTED POINTS ABOUT
EACH LANGUAGE
RUBY
•
Object oriented, class based, dynamic and strongly
typed
•
*Extremely* meta-programmable
•
OPEN CLASSES !!!!!!
•
Co...
IO
•
Object oriented, prototype based, strongly typed
•
Extremely simple and consistent syntax
•
Heavy emphasis on message...
IO
IO
Message
IO
Message
IO
Message
IO
Message
IO
IO
SCALA
•
OOP, FP, statically typed, strongly typed
•
Has a powerful type system (not as much as Haskell's)
•
Offers advance...
SCALA
SCALA
SCALA
SCALA
SCALA
ERLANG
•
Designed by Ericsson to build telecom software
•
Alien syntax, derived from Prolog
•
Functional, enforces extreme...
CLOJURE
•
Is a LISP (!!1!!11)
•
FP, supports OOP, strongly typed and dynamically
•
Strong focus on good concurrency primit...
CLOJURE
•
Although Clojure is a strict language, you can simulate
non-strictness using macros
•
Its possible to define the...
HASKELL
•
Non-strict (lazy) pure functional language
•
No exceptions and no mutable state (!)
•
Unparalleled type system (...
HASKELL
•
Makes it impossible to mutate state
•
But allow you to simulate its effects with Monads
HASKELL
HASKELL
HASKELL
3 – WHAT I LEARNED AFTER
READING THIS BOOK
WHAT DOES IT TAKE TO LEARN A NEW
LANGUAGE ?
•
Syntax
•
The programming languages primitives
•
The type system (strong or w...
WHAT DOES IT TAKE TO USE A LANGUAGE
IN PRODUCTION
•
Meta-programming and extensibility models
•
Concurrency model
•
Librar...
YOU CAN'T SEPARATE THE
LANGUAGE AND ITS ECOSYSTEM
IS IT THAT RUBY IS PRODUCTIVE IN
ITSELF, OR ARE RUBY LIBRARIES,
LIKE RAILS, PRODUCTIVE??
LEARN FROM OTHERS
UNDERSTAND HOW THEY SOLVE
PROBLEMS YOU HAVE, OR PROBLEMS
YOU DON'T EVEN KNOW YOU HAVE
GET TO KNOW WHAT YOU CAN
IMITATE !
SEE CONCURRENT-RUBY AND CELLULOID !
THERE IS *A LOT* OF COOL STUFF OUT
THERE. LOOK OUTSIDE YOUR COMMUNITY
HAVE FUN
HAVE FUN
OBRIGADO !
@renanranelli
/rranelli
Renan Ranelli (Milhouse)
milhouseonsofware.com
sete linguagens em sete semanas
sete linguagens em sete semanas
sete linguagens em sete semanas
Próximos SlideShares
Carregando em…5
×

sete linguagens em sete semanas

599 visualizações

Publicada em

O que o Rubyista tem para aprender com Io, Prolog, Clojure, Scala, Haskell e Erlang? Essa talk vai mostrar.

Publicada em: Educação
  • Seja o primeiro a comentar

sete linguagens em sete semanas

  1. 1. SEVEN LANGUAGES IN SEVEN WEEKS Renan Ranelli
  2. 2. Renan Ranelli (Milhouse)
  3. 3. Software Engineer @ Renan Ranelli (Milhouse)
  4. 4. AGENDA • Why should I care about learning new languages? • A little bit about the languages in the book and how they compare with Ruby • What I learned during the last few years
  5. 5. WHO IS THIS TALK FOR • You, who is an Object oriented programmer and has heard about functional programming • You, who have no clear understanding on why learning many languages will help you be better at your language of choice
  6. 6. 1 - WHY SHOULD I CARE?
  7. 7. WHY SHOULD I CARE ? • First of all... • I Think you should learn programming languages • But my opinion probably will not matter to you. So, listen to these guys:
  8. 8. http://blog.golang.org/concurrency-is-not-parallelism
  9. 9. http://blog.golang.org/concurrency-is-not-parallelism
  10. 10. http://blog.golang.org/concurrency-is-not-parallelism
  11. 11. DISCLAIMER: ALL THE LANGUAGES HERE ARE TURING COMPLETE
  12. 12. WE WILL A LITTLE ABOUT • Ruby • Io • Prolog • Scala • Erlang • Clojure • Haskell
  13. 13. WHAT I AIM TO ACHIEVE • I will try to explain what is important when learning a new programming language • I expect to show you that characterizations such as “it is a functional language” or “it is object oriented” is insufficient and most of the times innapropriate • I *Do Not* intend to teach you any of the languages
  14. 14. WE WILL A LITTLE ABOUT • Ruby • Io • Scala • Erlang • Clojure • Haskell Support for OOP Support for FP
  15. 15. 2 – SELECTED POINTS ABOUT EACH LANGUAGE
  16. 16. RUBY • Object oriented, class based, dynamic and strongly typed • *Extremely* meta-programmable • OPEN CLASSES !!!!!! • Complex syntax, complex evaluation rules • Reads like a novel • We all know and love it
  17. 17. IO • Object oriented, prototype based, strongly typed • Extremely simple and consistent syntax • Heavy emphasis on message passing, not method call. (method is a message that returns an object that can receive the message call) • Easy to create DSLs • Excellent concurrency primitives (futures, corroutines, actors) • CRAZY amount of reflective power
  18. 18. IO
  19. 19. IO Message
  20. 20. IO Message
  21. 21. IO Message
  22. 22. IO Message
  23. 23. IO
  24. 24. IO
  25. 25. SCALA • OOP, FP, statically typed, strongly typed • Has a powerful type system (not as much as Haskell's) • Offers advanced FP concepts such as monads and type classes • Easy(-ish) to create DSLs • You can emulate non-strict evaluation with “call by name” vs “call by value” parameter passing strategies • Suffers from the Java legacy to a certain extent (nulls)
  26. 26. SCALA
  27. 27. SCALA
  28. 28. SCALA
  29. 29. SCALA
  30. 30. SCALA
  31. 31. ERLANG • Designed by Ericsson to build telecom software • Alien syntax, derived from Prolog • Functional, enforces extreme isolation of processes. Truly share-nothing. • Amazing support for faul-tolerant, near-real-time distributed application development • Quite opinionated .. • ALIEN SYNTAX
  32. 32. CLOJURE • Is a LISP (!!1!!11) • FP, supports OOP, strongly typed and dynamically • Strong focus on good concurrency primitives and immutable & persistent data structures • Being a LISP, has macros • Being a LISP, code is data and data is code • Not so Lispy. No custom reader macros and no automatic tail call optimizations (schemers be mad)
  33. 33. CLOJURE • Although Clojure is a strict language, you can simulate non-strictness using macros • Its possible to define the language on-the-fly, i.e., the language is internally reprogramable (heavy influce in both Ruby and Smalltalk) • Offers the CLOS-like long forgotten multiple-dispatch !
  34. 34. HASKELL • Non-strict (lazy) pure functional language • No exceptions and no mutable state (!) • Unparalleled type system (at least in production-ready languages) with parametric types, type classes, algebraic data types and type inference • Offers the full pack of FP crazyness: Monads, Monoids, Functors, applicatives, Foldables and Semigroups are common ground among Haskell programmers • Much more close to Math, simplyfing the way we represent abstract, symbolic and self-recursive constructs
  35. 35. HASKELL • Makes it impossible to mutate state • But allow you to simulate its effects with Monads
  36. 36. HASKELL
  37. 37. HASKELL
  38. 38. HASKELL
  39. 39. 3 – WHAT I LEARNED AFTER READING THIS BOOK
  40. 40. WHAT DOES IT TAKE TO LEARN A NEW LANGUAGE ? • Syntax • The programming languages primitives • The type system (strong or weak? Static or dynamic?) • Evaluation rules (precedence, strictness, etc) • Idioms • Libraries • Tools, IDEs, yadda yadda
  41. 41. WHAT DOES IT TAKE TO USE A LANGUAGE IN PRODUCTION • Meta-programming and extensibility models • Concurrency model • Library distribution • Debugging, IDEs, Tools, Refactoring tools ... • *Community* • Concurrency model (again!)
  42. 42. YOU CAN'T SEPARATE THE LANGUAGE AND ITS ECOSYSTEM
  43. 43. IS IT THAT RUBY IS PRODUCTIVE IN ITSELF, OR ARE RUBY LIBRARIES, LIKE RAILS, PRODUCTIVE??
  44. 44. LEARN FROM OTHERS
  45. 45. UNDERSTAND HOW THEY SOLVE PROBLEMS YOU HAVE, OR PROBLEMS YOU DON'T EVEN KNOW YOU HAVE
  46. 46. GET TO KNOW WHAT YOU CAN IMITATE ! SEE CONCURRENT-RUBY AND CELLULOID !
  47. 47. THERE IS *A LOT* OF COOL STUFF OUT THERE. LOOK OUTSIDE YOUR COMMUNITY
  48. 48. HAVE FUN
  49. 49. HAVE FUN
  50. 50. OBRIGADO !
  51. 51. @renanranelli /rranelli Renan Ranelli (Milhouse) milhouseonsofware.com

×