Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

of

Oop is not Dead Slide 1 Oop is not Dead Slide 2 Oop is not Dead Slide 3 Oop is not Dead Slide 4 Oop is not Dead Slide 5 Oop is not Dead Slide 6 Oop is not Dead Slide 7 Oop is not Dead Slide 8 Oop is not Dead Slide 9 Oop is not Dead Slide 10 Oop is not Dead Slide 11 Oop is not Dead Slide 12 Oop is not Dead Slide 13 Oop is not Dead Slide 14 Oop is not Dead Slide 15 Oop is not Dead Slide 16 Oop is not Dead Slide 17 Oop is not Dead Slide 18 Oop is not Dead Slide 19 Oop is not Dead Slide 20 Oop is not Dead Slide 21 Oop is not Dead Slide 22 Oop is not Dead Slide 23 Oop is not Dead Slide 24 Oop is not Dead Slide 25 Oop is not Dead Slide 26 Oop is not Dead Slide 27 Oop is not Dead Slide 28 Oop is not Dead Slide 29 Oop is not Dead Slide 30 Oop is not Dead Slide 31 Oop is not Dead Slide 32 Oop is not Dead Slide 33

YouTube videos are no longer supported on SlideShare

View original on YouTube

Oop is not Dead Slide 35 Oop is not Dead Slide 36 Oop is not Dead Slide 37 Oop is not Dead Slide 38 Oop is not Dead Slide 39 Oop is not Dead Slide 40

YouTube videos are no longer supported on SlideShare

View original on YouTube

Oop is not Dead Slide 42

YouTube videos are no longer supported on SlideShare

View original on YouTube

Oop is not Dead Slide 44 Oop is not Dead Slide 45 Oop is not Dead Slide 46

YouTube videos are no longer supported on SlideShare

View original on YouTube

YouTube videos are no longer supported on SlideShare

View original on YouTube

Oop is not Dead Slide 49

YouTube videos are no longer supported on SlideShare

View original on YouTube

Oop is not Dead Slide 51 Oop is not Dead Slide 52 Oop is not Dead Slide 53 Oop is not Dead Slide 54 Oop is not Dead Slide 55 Oop is not Dead Slide 56

YouTube videos are no longer supported on SlideShare

View original on YouTube

YouTube videos are no longer supported on SlideShare

View original on YouTube

YouTube videos are no longer supported on SlideShare

View original on YouTube

Oop is not Dead Slide 60 Oop is not Dead Slide 61 Oop is not Dead Slide 62 Oop is not Dead Slide 63 Oop is not Dead Slide 64 Oop is not Dead Slide 65 Oop is not Dead Slide 66 Oop is not Dead Slide 67 Oop is not Dead Slide 68 Oop is not Dead Slide 69

4

Share

Download to read offline

Oop is not Dead

Download to read offline

Presentation at Nerdear.la 2017

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Oop is not Dead

  1. 1. OOP is not Dead or why we should stop seeing FP as its opponent or as silver bullet Hernán A. Wilkinson @hernanwilkinson agile software development & services
  2. 2. This will not be a war!
  3. 3. A little bit of Context…
  4. 4. A little bit of History…
  5. 5. Structured Programming, when?
  6. 6. Object Oriented Programming, when?
  7. 7. Simula 67 Ole-Johan Dahl y Kristen Nygaard
  8. 8. Simula 67 Ole-Johan Dahl y Kristen Nygaard
  9. 9. OOP before Structured Programming??
  10. 10. Functional Programming, when?
  11. 11. John McCarthy
  12. 12. What does make Lisp great? (always great! not, “great again”  ) LISP
  13. 13. (define (filtrar lista condicion) (cond ((esta-vacia? lista) lista-vacia) ((condicion (primero-de lista)) (concatenar (primero-de lista) (filtrar (resto-de lista) condicion))) (else (filtrar (resto-de lista) condicion)))) (filtrar ‘(1 4) (lambda (x) (< x 3))) —> ‘(1) (define smaller-than-three (lambda (x) (< x 3))) (filtrar ‘(1 4) smaller-than-three) —> ‘(1) (define (smaller-than n) (lambda (x) (< x n))) (filtrar ‘(1 4) (smaller-than 3)) —> ‘(1) Lambda Functions
  14. 14. Meta-Circular
  15. 15. Meta-Circular
  16. 16. Meta-Circular
  17. 17. Meta-Circular
  18. 18. Meta-Circular
  19. 19. Dynamic! - REPL
  20. 20. What is Object Oriented Programming?
  21. 21. Alan Kay
  22. 22. Dynabook (1970)
  23. 23. I invented the term Object-Oriented and I can tell you I did not have C++ in mind. Java and C++ make you think that the new ideas are like the old ones. Java is the most distressing thing to hit computing since MS-DOS
  24. 24. What is Object Oriented? • MUST • Everything is an Object (data is an object, code is an object, classes are objects, everything is an object!) • Computation is done sending messages • EITHER OR BOTH • Classes and Sub classification as means of knowledge organization • Objects as prototypes as means of knowledge organization • REALLY NICE TO HAVE • Immediate feedback • Completely Reflective Environment (Meta-Circular)
  25. 25. Dynamic! More than REPL, Inspectors!
  26. 26. What OO is not • Data types - int, long, double, etc. They are not objects • Statements - for, while, if, etc. They are not messages • Static methods - There is no “self/this” on static methods • Final/Seal methods – There is no message send when used • When ”code” is not an Object – No Closure or no Lambda, i.e. Java previous 1.8 • JEE is no OO, it is structured programming in Java • Anemic classes is not OO (Services with DTO, etc) • Use of Inheritance for Code reuse is not good OO (i.e. ActiveRecord , white box frameworks, etc) • Dependency Injection abuse is not OO • IoC abuse is not OO
  27. 27. This is not OO – Filter in Java
  28. 28. What is Functional Programming?
  29. 29. Wikipedia’s definition • […] treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data. • It is a declarative programming paradigm, which means programming is done with expressions[…]instead of statements. • Missing concepts from Wikipedia: • Lambda functions (which allow High Order functions) • Runtime support for recursive implementations (aka: tail recursion elimination) • Arguable: • Lazy evaluation (more or less) • Macro
  30. 30. Good OO Design favors Immutable Objects!
  31. 31. This is not OO!
  32. 32. This IS OO!
  33. 33. Real OO Languages represent “Code” as an object (Closure  High Order Functions) • Smalltalk since the ‘70s • ”Closures got famous because Java don’t have them” (Anonymous)
  34. 34. Some conclusions - Good OO implies: • Immutable objects when representing immutable entities • Closure  “High order functions” • Message sending all the way (expressions) • Consistency (everything is an object) • Knowledge representation and classification (Programs are Models!)
  35. 35. Some conclusions about FP • It is a mistake to think that FP is going to solve all the software design problems. • Design are made by humans, not by programming languages (even though they influence design decisions) • FP will suffer from the same “miss-used” problems as OO suffers now • FP does not provide a way to organize the knowledge represented in the software  data structures are not enough, we know that from Structured Programming
  36. 36. Some conclusions •OOP vs. FP is an absurd dichotomy •OOP and FP complement each other •Do not act as a “Pop Programmer”
  37. 37. From where “language programming paradigms shifts” will come from?
  38. 38. For sure NOT from • Performance improvements • Less verbose languages • Better type system (other complete topic to discuss) • It is “normal science” (khun-onian way to say “more of the same”)
  39. 39. They will come from • Better tools to help human-machine communication •Better environments to “augment” human intellect •More dynamic environments to improve immediate feedback •… •Let’s see some examples
  40. 40. For a new definition of Programming Paradigm! For better tools!
  41. 41. agile software development & services ¡Gracias!
  • alejosd5

    Oct. 16, 2017
  • DaminMazzini

    Oct. 14, 2017
  • beherca

    Aug. 22, 2017
  • sanmagarinos

    Jun. 24, 2017

Presentation at Nerdear.la 2017

Views

Total views

2,309

On Slideshare

0

From embeds

0

Number of embeds

66

Actions

Downloads

17

Shares

0

Comments

0

Likes

4

×