Caligrafia para desenvolvedores

2,223 views

Published on

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

No Downloads
Views
Total views
2,223
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
130
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Caligrafia para desenvolvedores

  1. 1. para desenvolvedoresdiogoriba@diogoriba.com
  2. 2. String name = "John"; Java
  3. 3. var name = "John";name.length // 4 javascript
  4. 4. List<string> names = new List<string>();names.Add("John");names.Add("Jane");foreach (string name in names){ if (name.StartsWith("J")) { Console.WriteLine(name); }} C#
  5. 5. let names = ["John"; "Jane"];;names |> List.filter(String.StartsWith("J")) |> List.iter(Console.WriteLine);; F#
  6. 6. switch (number){ case 1: doStuff(); case 2: doMoreStuff(); break;} C?
  7. 7. switch (number){ case 1: doStuff(); case 2: doMoreStuff(); break;} C?
  8. 8. switch (number){ case 1: doStuff(); // falling thru case 2: doMoreStuff(); break;} C?
  9. 9. try { return true;} finally { return false;} Java
  10. 10. switch (number){ case 1: x = doStuff(); case 2: x = doMoreStuff(); break;}
  11. 11. switch (number){ case 1: this.x = doStuff(); case 2: this.x = doMoreStuff(); break;}

×