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

A Small Smalltalk Talk [RUG::B edition]

A Small Smalltalk Talk [RUG::B edition]

Denis Defreyne

July 02, 2015
Tweet

More Decks by Denis Defreyne

Other Decks in Technology

Transcript

  1. person = Person.new person.first_name = 'Denis' 
 person := Person

    new. person firstName: 'Denis'. SMALLTALK RUBY
  2. people.each { |person| self.send_spam_to(person) } people do: [ :person |

    self sendSpamTo: person ]. people do: [ :each | self sendSpamTo: each ]. RUBY SMALLTALK
  3. people.each { |person| self.send_spam_to(person) } people do: [ :person |

    self sendSpamTo: person ]. people do: [ :each | self sendSpamTo: each ]. RUBY SMALLTALK
  4. people.select { |person| person.adult? } people.select(&:adult?) 
 people select: [

    :person | person isAdult ]. people select: #isAdult. RUBY SMALLTALK
  5. people select: #isAdult. people detect: #isAdult. people reject: #isAdult. people

    collect: #firstName. people inject: 0 into: [ :memo :each | memo + each age ] SMALLTALK
  6. poke = lambda { |person| person.poke } people.each(&poke) 
 poke

    := [ :person | person poke ]. people do: poke. RUBY SMALLTALK
  7. 1. The Smalltalk environment is 2. The Smalltalk community suffers

    from 3. Smalltalk isn’t revolutionary anymore.