資源描述:
《dart_streams_are_the_future》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在學(xué)術(shù)論文-天天文庫。
1、AsynchronousProgramminginDartStreamsaretheFutureFlorianLoitsch,GoogleWhoamI?FlorianLoitsch,softwareengineeratGoogleProjects●Hop-multi-tierlanguagebasedonBigloo●Scheme2Js-Scheme-to-JavaScriptcompiler●V8-high-performanceJavaScriptvirtualmachine●Dart-st
2、ructuredprogrammingforthewebTechleadofthecorelibrariesforthelast9months.WhatisDart?WhatisDart?●Unsurprisingobject-orientedprogramminglanguage●Class-basedsingleinheritance●Familiarsyntaxwithproperlexicalscoping●Optionalstatictypeannotationsmain(){for(
3、inti=99;i>0;i--){print("$ibottlesofbeeronthewall,....");print("Takeonedownandpassitaround...");}}MotivationsWewanttobuildgreatwebapplications.●Webappsarestillrareorunconvincing.●Bigapplicationsareapaintowriteandmaintain(Gmail).Weshouldhaveeverythingw
4、eneed:●GoodVMs●GoodUIelementsWritingbigapplicationsinJavaScriptistoohard.It'snotLisporSchemeLet'sgetthisoutoftheway.DartisnotLisporScheme.Dartdoesnothave:●Tailcalloptimizations.●Varargs.●Macros.●Methodoverloading.●Easy-to-parsesyntax.●Continuations.D
5、artFeaturesDartfeatures:●fastVMandgoodDart-to-JavaScriptcompiler.●optionalstatictypes.●easytopickup.●scalestobigprojects.●fastdevelopmentcycle(F5).●closures.●mixins.●Erlanginspiredprocesses("isolates").●integersanddoubles.●packagesandlibraries.●goodc
6、orelibrary.Benchmarks-RichardsDartOSkernelsimulationbenchmark,originallywritteninBCPLbyMartinRichards.V8V8hasbeentunedforthisbenchmarkforthelastsixyears.dart2jsPerformanceayearagonowBenchmarks-DeltaBlueDartOne-wayconstraintsolver,originallywritteninS
7、malltalkbyJohnMaloneyandMarioWolczko.V8hasbeentunedforthisdart2jsbenchmarkforthelastsixV8years.PerformanceayearagonowClosuresTwowaystowriteclosures:(x,y){foo(x);bar(y);return42;}(x)=>x+1;(x){returnx+1;}CoreLibrariesCoreLibraries●dart:core●dart:collec
8、tion●dart:async●dart:isolate●dart:mirror●dart:math●dart:io●dart:html●...dart:coreCoreisalwaysautomaticallyimported.Containsimportantclasseslike:●Iterable.●List(Arrays).●Set.●Map.●RegExp.IterablesIterablesarethefoundationofthecorelibrary:asequenceofel