Messages from Perl

413 views
333 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
413
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Messages from Perl

    1. 1. Messages from Perl id:aereal
    2. 2. id:aereal[誰?]aerealaerealaereal
    3. 3. RubyPerlJavaScript
    4. 4. I/O
    5. 5. I/O
    6. 6. Iohttp://iolanguage.com/
    7. 7. ActionScript C++ PHPALGOL Fortran COBOLJava C# Objective-CPascal Haskell PrologModula-2 Brainfxxk RScala Groovy Lua MLSmalltalk OCaml Go
    8. 8. $a <=> $b
    9. 9. Object-oriented Programming
    10. 10. OOP?messagingpolymorphismencapsulation
    11. 11. ImplementationsSimpleExpensive
    12. 12. Expensive impl. (1)First-class class and objectsCoupling tightly
    13. 13. Expensive impl. (2)RubyJava
    14. 14. class Car # ...end
    15. 15. Simple impl. (1)Use Dictionary-like data structureCoupling loosely
    16. 16. Simple impl. (2)JavaScriptPerl
    17. 17. package Car;sub new { my ($class) = @_; bless +{}, $class;}1;
    18. 18. Dynamic dispatch
    19. 19. Perl
    20. 20. package Car;sub run { my ($self) = @_; print “runn”;}
    21. 21. my $car = Car->new;run $car;
    22. 22. Indirect object syntax
    23. 23. Implicitly take arguments Perl Python
    24. 24. Ruby
    25. 25. class Car def run puts “run” endend
    26. 26. car = Car.newcar.send(“run”)
    27. 27. run = car.method(“run”)run.call
    28. 28. Method#.*#receiver -> object#owner -> class
    29. 29. Method instances know receiver
    30. 30. ConclusionsMany ‘Objects’Implementations are constraintsYou should be multi-lingual
    31. 31. おしまい

    ×