Dynamic Vs Static

8
 Discussion Topic: Dynamic vs Static Languages What is this about? What are they? How are they different? When to use? What is this not about? Arguing who's right or wrong

description

 

Transcript of Dynamic Vs Static

Page 1: Dynamic Vs Static

   

Discussion

● Topic: Dynamic vs Static Languages● What is this about?

● What are they?● How are they different?● When to use?

● What is this not about?● Arguing who's right or wrong

Page 2: Dynamic Vs Static

   

Let's Not Do This

Don't get tooworked up please!

Page 3: Dynamic Vs Static

   

Discussion Kick-Off

● What is a dynamic language?

Page 4: Dynamic Vs Static

   

Dynamic Typing (1)

private static void printCapitalOf(Country country){ System.out.println(country.capitalCity());}

public static void main(String[] args){ Country aus = new Australia(); Country jpn = new Japan(); printCapitalOf(aus); printCapitalOf(jpn);}

Page 5: Dynamic Vs Static

   

Dynamic Typing (2)

private static void printCapitalOf(Country country){ System.out.println(country.capitalCity());}

public static void main(String[] args){ Country aus = new Australia(); Country jpn = new Japan(); printCapitalOf(aus); printCapitalOf(jpn);}

Page 6: Dynamic Vs Static

   

Dynamic Typing (3)

def printCapitalOf(country){ print(country.capitalCity())}

def aus = new Australia();def jpn = new Japan();printCapitalOf(aus);printCapitalOf(jpn);

Page 7: Dynamic Vs Static

   

Dynamic Typing (4)

● Only for saving keystrokes?● Is punching keys really hard?

Page 8: Dynamic Vs Static

   

Summary

Use the right tool for the job!