http://www.pharo-project.org
Pharo in a nutshell

• Pharo = language + IDE + update mechanism


• Pure object-oriented programming language


• Dynamic...
Getting started with Pharo
Everything is an object
Everything happens by sending messages to
objects
Running Pharo
Do it, print it




 You can evaluate
  any expression
    anywhere
     in Pharo
Standard development tools
Standard development tools
Debugger, explorer, inspector
Syntax in a nutshell
3 kinds of messages


                      5 factorial
  Unary messages
                      Transcript cr


  Binary me...
A typical method in Point

  Method name      Argument               Comment


     <= aPoint
     
 "Answer whether the r...
Statement and cascades



        Temporary variables
                               Statement

            | p pen |
    ...
Control structures


Every control structure is realized by message sends
          4 timesRepeat: [Beeper beep]




     ...
Control structures


Every control structure is realized by message sends
          4 timesRepeat: [Beeper beep]
         ...
Creating classes

Send a message to a class (!)


    Number subclass: #Complex
    
 instanceVariableNames: 'real imagina...
Be involved! Join Pharo

• Strong community


• Goal: learning and having fun




• We need forces on several topics: grap...
Links

• Webpage: http://www.pharo-project.org


• Download: http://www.pharo-project.org/download


• Mailing list: http:...
The Pharo Programming Language
Upcoming SlideShare
Loading in...5
×

The Pharo Programming Language

13,345

Published on

Pharo is a Smalltalk dialect programming language. From the pharo-project.org website:
"Pharo's goal is to deliver a clean, innovative, open-source Smalltalk environment. By providing a stable and small core system, excellent developer tools, and maintained releases, Pharo is an attractive platform to build and deploy mission critical Smalltalk applications. Pharo is MIT licensed and is steered by a board of benevolent dictators. The board makes final decisions if no consensus can be reached within the community. Pharo fosters a healthy ecosystem of both private and commercial contributors who advance and maintain the core system and its external packages."

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

No Downloads
Views
Total Views
13,345
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
32
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

The Pharo Programming Language

  1. 1. http://www.pharo-project.org
  2. 2. Pharo in a nutshell • Pharo = language + IDE + update mechanism • Pure object-oriented programming language • Dynamically typed and trait-based • Open and flexible environment (OB, Polymorph, Scripting) • Using as executing platform for Seaside and Aida/Web web frameworks
  3. 3. Getting started with Pharo
  4. 4. Everything is an object
  5. 5. Everything happens by sending messages to objects
  6. 6. Running Pharo
  7. 7. Do it, print it You can evaluate any expression anywhere in Pharo
  8. 8. Standard development tools
  9. 9. Standard development tools
  10. 10. Debugger, explorer, inspector
  11. 11. Syntax in a nutshell
  12. 12. 3 kinds of messages 5 factorial Unary messages Transcript cr Binary messages 3 + 4 Keywords messages 3 raisedTo: 10 modulo: 5 Transcript show: 'hello world'
  13. 13. A typical method in Point Method name Argument Comment <= aPoint "Answer whether the receiver is neither below nor to the right of aPoint." ^ x <= aPoint x and: [y <= aPoint y] Return Binary message Block Instance variable Keyword message (2@3) <= (5@6) true
  14. 14. Statement and cascades Temporary variables Statement | p pen | p := 100@100. pen := Pen new. pen up. pen goto: p; down; goto: p+p Cascade
  15. 15. Control structures Every control structure is realized by message sends 4 timesRepeat: [Beeper beep] max: aNumber ^ self < aNumber ifTrue: [aNumber] ifFalse: [self]
  16. 16. Control structures Every control structure is realized by message sends 4 timesRepeat: [Beeper beep] Boolean ifTrue:ifFalse: max: aNumber True False ^ self < aNumber ifTrue:ifFalse: ifTrue:ifFalse: ifTrue: [aNumber] ifFalse: [self] ifTrue: t ifFalse: f ifTrue: t ifFalse: f ^ t value ^ f value
  17. 17. Creating classes Send a message to a class (!) Number subclass: #Complex instanceVariableNames: 'real imaginary' classVariableNames: '' poolDictionaries: '' category: 'ComplexNumbers'
  18. 18. Be involved! Join Pharo • Strong community • Goal: learning and having fun • We need forces on several topics: graphics programming, compilation, virtual machines
  19. 19. Links • Webpage: http://www.pharo-project.org • Download: http://www.pharo-project.org/download • Mailing list: http://gforge.inria.fr/mail/?group_id=1299
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×