SlideShare uma empresa Scribd logo
1 de 10
Baixar para ler offline
Dart	
                 {	
 Google’s  answer  to  Javascript	




Raoul-­‐‑Gabriel  Urma
What  is  Dart?	
Ñ    Dart  is  a  new  class-­‐‑based  programming  language  for  
      creating  structured  web  applications.  Developed  with  
      the  goals  of  simplicity,  efficiency,  and  scalability,  the  
      Dart  language  combines  powerful  new  language  
      features  with  familiar  language  constructs  into  a  clear,  
      readable  syntax.	



                    Compiles  to  Javascript	
                    Runs  on  VM
Design  goals	
Ñ  Create  a  structured  yet  flexible  programming  
    language  for  the  web.	
Ñ  Make  Dart  feel  familiar  and  natural  to  programmers  

    and  thus  easy  to  learn.	
Ñ  Ensure  that  all  Dart  language  constructs  allow  high  

    performance  and  fast  application  startup.	
Ñ  Make  Dart  appropriate  for  the  full  range  of  devices  
    on  the  web—including  phones,  tablets,  laptops,  and  
    servers.	
Ñ  Provide  tools  that  make  Dart  run  fast  across  all  

    major  modern  browsers.
In  a  nutshell…	
       Ñ    Class-­‐‑based	
       Ñ    Single  inheritance	
       Ñ    Pure  (everything  is  an  object)	
       Ñ    Optional  types	
       Ñ    First-­‐‑class  functions	
       Ñ    Java-­‐‑like  syntax  (shorter)	
       Ñ    Null!!	
       Ñ    Actor  model  (isolates  light  vs  heavy)	
       Ñ    Collections  classes  (Set,  Map,  List,  Queue)	
       Ñ    Named  constructors	

“The  type  system  is  unsound,  due  to  the  covariance  of  generic  types.  
This  is  a  deliberate  choice  (and  undoubtedly  controversial).  
Experience  has  shown  that  sound  type  rules  for  generics  	
fly  in  the  face  of  programmer  intuition.  It  is  easy  for  tools  to  provide  
a  sound  type  analysis  if  they  choose,  which  may  be  useful  for  tasks  
like  refactoring.”
Fun  with  Dart	
Ñ    h]p://try.dartlang.org/s/F-­‐‑MX	

Ñ  Variables  initialized  to  null	
Ñ  Generics  are  covariant
Ñ    main()  {	
Ñ        List<Banana>  listOfBananas  =  new  List<Banana>();	
Ñ        List<Fruit>  listOfFruits  =  listOfBananas;	
Ñ        listOfFruits.add(new  Apple());	
Ñ        print(listOfBananas[0]);  //  apple	
Ñ    }	

Ñ    class  Apple  extends  Fruit{	
Ñ        toString()  {  return  "ʺapple"ʺ;}	
Ñ    }	

Ñ    class  Banana  extends  Fruit{	
Ñ            toString()  {  return  "ʺbanana"ʺ;}	
Ñ    }	

Ñ    class  Fruit{	
Ñ        toString()  {  return  "ʺfruit"ʺ;}	
Ñ    }
Ñ  main()  {	
Ñ      num  i;	

Ñ      num  j  =  i  +  5;  //  NPE	

Ñ  }
Dart  vs  Newspeak  [1]	
  Ñ  Class-­‐‑based  ✓	
  Ñ  First-­‐‑class  modules  ✗	

  Ñ  Reflection  (coming  soon  -­‐‑  based  on  mirrors  [2])  ✓	

  Ñ  Mixins  ✗	

  Ñ  Names  as  method  invocation  ✗	

  Ñ  Immutability  enforcement  ✗	




[1]:  h]p://bracha.org/newspeak-­‐‑modules.pdf	
[2]:  h]p://bracha.org/mirrors.pdf
Dart  vs  CoffeeScript	
            Ñ  Pa]ern  matching  ✗ (coming  soon?  [1])

            Ñ  Prototype  Based  ✗


            Ñ  List  comprehension  ✗


            Ñ  Compiles  to  JS  ✓


            

            


            

            

[1]  Pa]ern  Matching  for  an  Object-­‐‑Oriented  and  	
            	
Dynamically  Typed  Programming  Language  –  Gilad  Bracha
Links	
Ñ  h]p://code.google.com/p/dart/issues/list	
Ñ  h]p://gototoday.dk/2011/10/10/lars-­‐‑bak-­‐‑on-­‐‑
    dart/	
Ñ  h]p://bracha.org/Site/Home.html	

Ñ  h]p://dartinside.com/2011/live-­‐‑from-­‐‑dart-­‐‑

    launch/

Mais conteúdo relacionado

Mais procurados (20)

Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Linker and Loader
Linker and Loader Linker and Loader
Linker and Loader
 
Javascript
JavascriptJavascript
Javascript
 
Dart Programming.pptx
Dart Programming.pptxDart Programming.pptx
Dart Programming.pptx
 
Html 5
Html 5Html 5
Html 5
 
Introduction to system programming
Introduction to system programmingIntroduction to system programming
Introduction to system programming
 
Sgml and xml
Sgml and xmlSgml and xml
Sgml and xml
 
Javascript basics
Javascript basicsJavascript basics
Javascript basics
 
Introduction to JavaScript Basics.
Introduction to JavaScript Basics.Introduction to JavaScript Basics.
Introduction to JavaScript Basics.
 
Xml schema
Xml schemaXml schema
Xml schema
 
Xml ppt
Xml pptXml ppt
Xml ppt
 
Html forms
Html formsHtml forms
Html forms
 
javascript objects
javascript objectsjavascript objects
javascript objects
 
introduction to programming languages
introduction to programming languagesintroduction to programming languages
introduction to programming languages
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
 
XML Schema
XML SchemaXML Schema
XML Schema
 
XSLT.ppt
XSLT.pptXSLT.ppt
XSLT.ppt
 
PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
 
Java script
Java scriptJava script
Java script
 

Destaque

Introduction to Dart
Introduction to DartIntroduction to Dart
Introduction to DartRamesh Nair
 
How to build a Dart and Firebase app in 30 mins
How to build a Dart and Firebase app in 30 minsHow to build a Dart and Firebase app in 30 mins
How to build a Dart and Firebase app in 30 minsJana Moudrá
 
JavaScript, Dart, TypeScript & CoffeeScript Comparison
JavaScript, Dart, TypeScript & CoffeeScript ComparisonJavaScript, Dart, TypeScript & CoffeeScript Comparison
JavaScript, Dart, TypeScript & CoffeeScript ComparisonHaim Michael
 
Introduction to the Dart language
Introduction to the Dart languageIntroduction to the Dart language
Introduction to the Dart languageJana Moudrá
 
Introduction to Flutter - truly crossplatform, amazingly fast
Introduction to Flutter - truly crossplatform, amazingly fastIntroduction to Flutter - truly crossplatform, amazingly fast
Introduction to Flutter - truly crossplatform, amazingly fastBartosz Kosarzycki
 
TypeScript, Dart, CoffeeScript and JavaScript Comparison
TypeScript, Dart, CoffeeScript and JavaScript ComparisonTypeScript, Dart, CoffeeScript and JavaScript Comparison
TypeScript, Dart, CoffeeScript and JavaScript ComparisonHaim Michael
 
Structured Apps with Google Dart
Structured Apps with Google DartStructured Apps with Google Dart
Structured Apps with Google DartJermaine Oppong
 
Dart como alternativa a TypeScript (Codemotion 2016)
Dart como alternativa a TypeScript (Codemotion 2016)Dart como alternativa a TypeScript (Codemotion 2016)
Dart como alternativa a TypeScript (Codemotion 2016)Rafael Bermúdez Míguez
 

Destaque (8)

Introduction to Dart
Introduction to DartIntroduction to Dart
Introduction to Dart
 
How to build a Dart and Firebase app in 30 mins
How to build a Dart and Firebase app in 30 minsHow to build a Dart and Firebase app in 30 mins
How to build a Dart and Firebase app in 30 mins
 
JavaScript, Dart, TypeScript & CoffeeScript Comparison
JavaScript, Dart, TypeScript & CoffeeScript ComparisonJavaScript, Dart, TypeScript & CoffeeScript Comparison
JavaScript, Dart, TypeScript & CoffeeScript Comparison
 
Introduction to the Dart language
Introduction to the Dart languageIntroduction to the Dart language
Introduction to the Dart language
 
Introduction to Flutter - truly crossplatform, amazingly fast
Introduction to Flutter - truly crossplatform, amazingly fastIntroduction to Flutter - truly crossplatform, amazingly fast
Introduction to Flutter - truly crossplatform, amazingly fast
 
TypeScript, Dart, CoffeeScript and JavaScript Comparison
TypeScript, Dart, CoffeeScript and JavaScript ComparisonTypeScript, Dart, CoffeeScript and JavaScript Comparison
TypeScript, Dart, CoffeeScript and JavaScript Comparison
 
Structured Apps with Google Dart
Structured Apps with Google DartStructured Apps with Google Dart
Structured Apps with Google Dart
 
Dart como alternativa a TypeScript (Codemotion 2016)
Dart como alternativa a TypeScript (Codemotion 2016)Dart como alternativa a TypeScript (Codemotion 2016)
Dart como alternativa a TypeScript (Codemotion 2016)
 

Semelhante a Dart

OWF12/PAUG Conf Days Dart a new html5 technology, nicolas geoffray, softwar...
OWF12/PAUG Conf Days Dart   a new html5 technology, nicolas geoffray, softwar...OWF12/PAUG Conf Days Dart   a new html5 technology, nicolas geoffray, softwar...
OWF12/PAUG Conf Days Dart a new html5 technology, nicolas geoffray, softwar...Paris Open Source Summit
 
Exploring language classification with spark and the spark notebook
Exploring language classification with spark and the spark notebookExploring language classification with spark and the spark notebook
Exploring language classification with spark and the spark notebookGerard Maas
 
Enterprise Data Workflows with Cascading and Windows Azure HDInsight
Enterprise Data Workflows with Cascading and Windows Azure HDInsightEnterprise Data Workflows with Cascading and Windows Azure HDInsight
Enterprise Data Workflows with Cascading and Windows Azure HDInsightPaco Nathan
 
Comparative Study of programming Languages
Comparative Study of programming LanguagesComparative Study of programming Languages
Comparative Study of programming LanguagesIshan Monga
 
R Introduction
R IntroductionR Introduction
R Introductionschamber
 
Dart presentation
Dart presentationDart presentation
Dart presentationLucas Leal
 
Introduction to r
Introduction to rIntroduction to r
Introduction to rgslicraf
 
R as supporting tool for analytics and simulation
R as supporting tool for analytics and simulationR as supporting tool for analytics and simulation
R as supporting tool for analytics and simulationAlvaro Gil
 
Programming Paradigms
Programming ParadigmsProgramming Paradigms
Programming ParadigmsJaneve George
 
Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Guillaume Laforge
 
Buildr - build like you code
Buildr -  build like you codeBuildr -  build like you code
Buildr - build like you codeIzzet Mustafaiev
 
Traits: A New Language Feature for PHP?
Traits: A New Language Feature for PHP?Traits: A New Language Feature for PHP?
Traits: A New Language Feature for PHP?Stefan Marr
 
R programming Language , Rahul Singh
R programming Language , Rahul SinghR programming Language , Rahul Singh
R programming Language , Rahul SinghRavi Basil
 
AestasIT - Internal DSLs in Scala
AestasIT - Internal DSLs in ScalaAestasIT - Internal DSLs in Scala
AestasIT - Internal DSLs in ScalaDmitry Buzdin
 
Programming Paradigms
Programming ParadigmsProgramming Paradigms
Programming ParadigmsDirecti Group
 
React Native VS Flutter - Which One is The Best.
React Native VS Flutter - Which One is The Best.React Native VS Flutter - Which One is The Best.
React Native VS Flutter - Which One is The Best.Techugo
 
Introduction to Apache Spark
Introduction to Apache Spark Introduction to Apache Spark
Introduction to Apache Spark Hubert Fan Chiang
 

Semelhante a Dart (20)

OWF12/PAUG Conf Days Dart a new html5 technology, nicolas geoffray, softwar...
OWF12/PAUG Conf Days Dart   a new html5 technology, nicolas geoffray, softwar...OWF12/PAUG Conf Days Dart   a new html5 technology, nicolas geoffray, softwar...
OWF12/PAUG Conf Days Dart a new html5 technology, nicolas geoffray, softwar...
 
Exploring language classification with spark and the spark notebook
Exploring language classification with spark and the spark notebookExploring language classification with spark and the spark notebook
Exploring language classification with spark and the spark notebook
 
Enterprise Data Workflows with Cascading and Windows Azure HDInsight
Enterprise Data Workflows with Cascading and Windows Azure HDInsightEnterprise Data Workflows with Cascading and Windows Azure HDInsight
Enterprise Data Workflows with Cascading and Windows Azure HDInsight
 
Comparative Study of programming Languages
Comparative Study of programming LanguagesComparative Study of programming Languages
Comparative Study of programming Languages
 
R Introduction
R IntroductionR Introduction
R Introduction
 
Dart
DartDart
Dart
 
Dart presentation
Dart presentationDart presentation
Dart presentation
 
Dart Jump Start
Dart Jump StartDart Jump Start
Dart Jump Start
 
Introduction to r
Introduction to rIntroduction to r
Introduction to r
 
R as supporting tool for analytics and simulation
R as supporting tool for analytics and simulationR as supporting tool for analytics and simulation
R as supporting tool for analytics and simulation
 
Programming Paradigms
Programming ParadigmsProgramming Paradigms
Programming Paradigms
 
Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007
 
Buildr - build like you code
Buildr -  build like you codeBuildr -  build like you code
Buildr - build like you code
 
Dart programming language
Dart programming languageDart programming language
Dart programming language
 
Traits: A New Language Feature for PHP?
Traits: A New Language Feature for PHP?Traits: A New Language Feature for PHP?
Traits: A New Language Feature for PHP?
 
R programming Language , Rahul Singh
R programming Language , Rahul SinghR programming Language , Rahul Singh
R programming Language , Rahul Singh
 
AestasIT - Internal DSLs in Scala
AestasIT - Internal DSLs in ScalaAestasIT - Internal DSLs in Scala
AestasIT - Internal DSLs in Scala
 
Programming Paradigms
Programming ParadigmsProgramming Paradigms
Programming Paradigms
 
React Native VS Flutter - Which One is The Best.
React Native VS Flutter - Which One is The Best.React Native VS Flutter - Which One is The Best.
React Native VS Flutter - Which One is The Best.
 
Introduction to Apache Spark
Introduction to Apache Spark Introduction to Apache Spark
Introduction to Apache Spark
 

Último

Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 

Último (20)

Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Dart

  • 1. Dart { Google’s  answer  to  Javascript Raoul-­‐‑Gabriel  Urma
  • 2. What  is  Dart? Ñ  Dart  is  a  new  class-­‐‑based  programming  language  for   creating  structured  web  applications.  Developed  with   the  goals  of  simplicity,  efficiency,  and  scalability,  the   Dart  language  combines  powerful  new  language   features  with  familiar  language  constructs  into  a  clear,   readable  syntax. Compiles  to  Javascript Runs  on  VM
  • 3. Design  goals Ñ  Create  a  structured  yet  flexible  programming   language  for  the  web. Ñ  Make  Dart  feel  familiar  and  natural  to  programmers   and  thus  easy  to  learn. Ñ  Ensure  that  all  Dart  language  constructs  allow  high   performance  and  fast  application  startup. Ñ  Make  Dart  appropriate  for  the  full  range  of  devices   on  the  web—including  phones,  tablets,  laptops,  and   servers. Ñ  Provide  tools  that  make  Dart  run  fast  across  all   major  modern  browsers.
  • 4. In  a  nutshell… Ñ  Class-­‐‑based Ñ  Single  inheritance Ñ  Pure  (everything  is  an  object) Ñ  Optional  types Ñ  First-­‐‑class  functions Ñ  Java-­‐‑like  syntax  (shorter) Ñ  Null!! Ñ  Actor  model  (isolates  light  vs  heavy) Ñ  Collections  classes  (Set,  Map,  List,  Queue) Ñ  Named  constructors “The  type  system  is  unsound,  due  to  the  covariance  of  generic  types.   This  is  a  deliberate  choice  (and  undoubtedly  controversial).   Experience  has  shown  that  sound  type  rules  for  generics   fly  in  the  face  of  programmer  intuition.  It  is  easy  for  tools  to  provide   a  sound  type  analysis  if  they  choose,  which  may  be  useful  for  tasks   like  refactoring.”
  • 5. Fun  with  Dart Ñ  h]p://try.dartlang.org/s/F-­‐‑MX Ñ  Variables  initialized  to  null Ñ  Generics  are  covariant
  • 6. Ñ  main()  { Ñ     List<Banana>  listOfBananas  =  new  List<Banana>(); Ñ     List<Fruit>  listOfFruits  =  listOfBananas; Ñ     listOfFruits.add(new  Apple()); Ñ     print(listOfBananas[0]);  //  apple Ñ  } Ñ  class  Apple  extends  Fruit{ Ñ     toString()  {  return  "ʺapple"ʺ;} Ñ  } Ñ  class  Banana  extends  Fruit{ Ñ         toString()  {  return  "ʺbanana"ʺ;} Ñ  } Ñ  class  Fruit{ Ñ     toString()  {  return  "ʺfruit"ʺ;} Ñ  }
  • 7. Ñ  main()  { Ñ     num  i; Ñ     num  j  =  i  +  5;  //  NPE Ñ  }
  • 8. Dart  vs  Newspeak  [1] Ñ  Class-­‐‑based  ✓ Ñ  First-­‐‑class  modules  ✗ Ñ  Reflection  (coming  soon  -­‐‑  based  on  mirrors  [2])  ✓ Ñ  Mixins  ✗ Ñ  Names  as  method  invocation  ✗ Ñ  Immutability  enforcement  ✗ [1]:  h]p://bracha.org/newspeak-­‐‑modules.pdf [2]:  h]p://bracha.org/mirrors.pdf
  • 9. Dart  vs  CoffeeScript Ñ  Pa]ern  matching  ✗ (coming  soon?  [1]) Ñ  Prototype  Based  ✗ Ñ  List  comprehension  ✗ Ñ  Compiles  to  JS  ✓ [1]  Pa]ern  Matching  for  an  Object-­‐‑Oriented  and   Dynamically  Typed  Programming  Language  –  Gilad  Bracha
  • 10. Links Ñ  h]p://code.google.com/p/dart/issues/list Ñ  h]p://gototoday.dk/2011/10/10/lars-­‐‑bak-­‐‑on-­‐‑ dart/ Ñ  h]p://bracha.org/Site/Home.html Ñ  h]p://dartinside.com/2011/live-­‐‑from-­‐‑dart-­‐‑ launch/