This article is about a programming language. For the advertising application formerly named Google Dart, see DoubleClick for Publishers by Google. For other uses, see Dart.
Dart was unveiled at the GOTO conference in Aarhus, Denmark, October 10–12, 2011.[10]Lars Bak and Kasper Lund founded the project.[11] Dart 1.0 was released on November 14, 2013.[12]
Dart had a mixed reception at first. Some criticized the Dart initiative for fragmenting the web because of plans to include a Dart VM in Chrome. Those plans were dropped in 2015 with the Dart 1.9 release. Focus changed to compiling Dart code to JavaScript.[13]
Dart 2.0 was released in August 2018 with language changes including a type system.[14]
Dart 2.6 introduced a new extension, dart2native. This extended native compilation to the Linux, macOS, and Windows desktop platforms.[15] Earlier developers could create new tools using only Android or iOS devices. With this extension, developers could deploy a program into self-contained executables. The Dart SDK doesn't need to be installed to run these self-contained executables.[16] The Flutter toolkit integrates Dart, so it can compile on small services like backend support.[17][18]
Dart 3.0 was released in May 2023[19] with changes to the type system to require sound null safety. This release included new features like records, patterns,[20] and class modifiers.[21]
Dart released the 5th edition of its language specification on April 9, 2021.[23] This covers all syntax through Dart 2.10. A draft of the 6th edition includes all syntax through 2.13.[24]Accepted proposals for the specification and drafts of potential features can be found in the Dart language repository on GitHub.[25]
ECMA International formed technical committee, TC52,[26] to standardize Dart. ECMA approved the first edition of the Dart language specification as ECMA-408[27] in July 2014 at its 107th General Assembly.[28] Subsequent editions were approved in December 2014,[29] June 2015, and December 2015.[27]
Deploying apps
The Dart software development kit (SDK) ships with a standalone Dart runtime. This allows Dart code to run in a command-line interface environment. The SDK includes tools to compile and package Dart apps.[30] Dart ships with a complete standard library allowing users to write fully working system apps like custom web servers.[31]
Dart 3 can deploy apps to the web as either JavaScript or WebAssembly apps. Dart supports compiling to WebAssembly as of May 2024[update].
JavaScript
To run in mainstream web browsers, Dart relies on a source-to-source compiler to JavaScript. This makes Dart apps compatible with all major browsers. Dart optimizes the compiled JavaScript output to avoid expensive checks and operations. This results in JavaScript code that can run faster than equivalent code handwritten in plain JavaScript.[33]
The first Dart-to-JavaScript compiler was dartc. It was deprecated in Dart 2.0.
The second Dart-to-JavaScript compiler was frog.[34] Written in Dart, it was introduced in 2013 and deprecated in 2020. This should not be confused with Dart Frog,[35] an open-source Dart framework for building backend systems from Very Good Ventures.
The third Dart-to-JavaScript compiler is dart2js. Introduced in Dart 2.0,[36] the Dart-based dart2js evolved from earlier compilers. It intended to implement the full Dart language specification and semantics. Developers use this compiler for production builds. It compiles to minified JavaScript.
The fourth Dart-to-JavaScript compiler is dartdevc.[37] Developers could use this compiler for development builds. It compiles to human-readable JavaScript. On March 28, 2013, the Dart team posted an update on their blog addressing Dart code compiled to JavaScript with the dart2js compiler,[38] stating that it now runs faster than handwritten JavaScript on Chrome's V8 JavaScript engine for the DeltaBlue benchmark.[39]
Prior to Dart 2.18, both dart2js and dartdevc could be called from the command line. Dart 2.18 folded these functions into the Dart SDK. This removed the direct command line wrappers but kept the two compilers. The webdev serve command calls the dartdevc compiler. The webdev build command calls the dart2js compiler.
The Dart SDK compiles to JavaScript in two ways.
To debug code, run webdev serve to compile a larger JavaScript file with human-readable code. Dart-generated JavaScript can be debugged using Chrome only.
With the Dart 3.22 release, Google announced support for compiling Dart code to WebAssembly.[22] Full support for Wasm requires adoption of the WasmGC[40] feature into the Wasm standard. Chrome 119[41] supports WasmGC. Firefox[42] 120 and later could support WasmGC, but a current bug is blocking compatibility.[43]Safari[44] and Microsoft Edge are integrating WasmGC support.
Deploying to native platforms
Dart can compile to native machine code for macOS, Windows, and Linux as command line tools. Dart can compile apps with user interfaces to the web, iOS, Android, macOS, Windows, and Linux using the Flutter framework.
Self-contained executable
Self-contained executables include native machine code compiled from the specified Dart code file, its dependencies, and a small Dart runtime. The runtime handles type checking and garbage collection. The compiler produces output specific to the architecture on which the developer compiled it. This file can be distributed as any other native executable.
When compiled ahead of time,[45] Dart code produces performant and platform-specific modules. It includes all dependent libraries and packages the app needs. This increases its compilation time. The compiler outputs an app specific to the architecture on which it was compiled.
When compiled just in time, Dart code produces performant modules that compile fast. This module needs the Dart VM included with the SDK to run. The compiler loads all parsed classes and compiled code into memory the first time the app runs. This speeds up any subsequent run of the app. The compiler outputs an app specific to the architecture on which it was compiled.
When compiled as a kernel module, Dart code produces a machine-independent format called the Dart Intermediate Representation (Dart IR). The Dart IR bytecode format can work on any architecture that has a Dart VM. This makes this format very portable and quick to compile, but less performant than other compilation outputs.
To achieve concurrency, Dart uses isolated, independent workers that do not share memory, but use message passing,[46] similarly to Erlang processes (also see actor model). Every Dart program uses at least one isolate, which is the main isolate. Since Dart 2, the Dart web platform no longer supports isolates, and suggests developers use Web Workers instead.[47]
Null safety
Starting with Dart 2.12, Dart introduced sound null safety.[48] This serves as a guarantee that variables cannot return a null value unless it has explicit permission. Null safety prevents the developer from introducing null-pointer exceptions, a common, but difficult to debug, error. With Dart 3.0, all code must follow sound null safety.
Data storage
Snapshot files, a core part of the Dart VM, store objects and other runtime data.[46]
Script snapshots
Dart programs can be compiled into snapshot files containing all of the program code and dependencies preparsed and ready to execute, allowing fast startups.
Full snapshots
The Dart core libraries can be compiled into a snapshot file that allows fast loading of the libraries. Most standard distributions of the main Dart VM have a prebuilt snapshot for the core libraries that is loaded at runtime.
Object snapshots
Dart uses snapshots to serialize messages that it passes between isolates. As a very asynchronous language, Dart uses isolates for concurrency.[49] An object generates a snapshot, transfers it to another isolate, then the isolate deserializes it.
In 2013, the Chromium team began work on an open source, Chrome App-based development environment with a reusable library of GUI widgets, codenamed Spark.[60] The project was later renamed as Chrome Dev Editor.[61] Built in Dart, it contained Spark which is powered by Polymer.[62]
In June 2015, Google transferred the CDE project to GitHub as a free software project and ceased active investment in CDE.[63] The Chrome Dev Editor project was archived on April 24, 2021.[64]
DartPad
To provide an easier way to start using Dart, the Dart team created DartPad at the start of 2015. This online editor allows developers to experiment with Dart application programming interfaces (APIs) and run Dart code. It provides syntax highlighting, code analysis, code completion, documentation, and HTML and CSS editing.[65]
Development tools
The Dart DevTools, written in Dart,[66] include debugging and performance tools.
Flutter
Google introduced Flutter for native app development. Built using Dart, C, C++ and Skia, Flutter is an open-source, multi-platform app UI framework. Prior to Flutter 2.0, developers could only target Android, iOS and the web. Flutter 2.0 released support for macOS, Linux, and Windows as a beta feature.[67] Flutter 2.10 released with production support for Windows[68] and Flutter 3 released production support for all desktop platforms.[69] It provides a framework, widgets, and tools. This framework gives developers a way to build and deploy mobile, desktop, and web apps.[70] Flutter works with Firebase[71] and supports extending the framework through add-ons called packages. These can be found on their package repository, pub.dev.[72] JetBrains also supports a Flutter plugin.[73]
voidmain(){vari=20;print('fibonacci($i) = ${fibonacci(i)}');}/// Computes the nth Fibonacci number.intfibonacci(intn){returnn<2?n:(fibonacci(n-1)+fibonacci(n-2));}
A simple class:
// Import the math library to get access to the sqrt function.// Imported with `math` as name, so accesses need to use `math.` as prefix.import'dart:math'asmath;// Create a class for Point.classPoint{// Final variables cannot be changed once they are assigned.// Declare two instance variables.finalnumx,y;// A constructor, with syntactic sugar for setting instance variables.// The constructor has two mandatory parameters.Point(this.x,this.y);// A named constructor with an initializer list.Point.origin():x=0,y=0;// A method.numdistanceTo(Pointother){vardx=x-other.x;vardy=y-other.y;returnmath.sqrt(dx*dx+dy*dy);}// Example of a "getter".// Acts the same as a final variable, but is computed on each access.numgetmagnitude=>math.sqrt(x*x+y*y);// Example of operator overloadingPointoperator+(Pointother)=>Point(x+other.x,y+other.y);// When instantiating a class such as Point in Dart 2+, new is // an optional word}// All Dart programs start with main().voidmain(){// Instantiate point objects.varp1=Point(10,10);print(p1.magnitude);varp2=Point.origin();vardistance=p1.distanceTo(p2);print(distance);}
Influences from other languages
Dart belongs to the ALGOL language family.[75][failed verification] Its members include C, Java, C#, JavaScript, and others.
The method cascade syntax was adopted from Smalltalk.[76] This syntax provides a shortcut for invoking several methods one after another on the same object.
Dart makes use of isolates as a concurrency and security unit when structuring applications.[79] The Isolate concept builds upon the Actor model implemented in Erlang.[80]
In 2004, Gilad Bracha (who was a member of the Dart team) and David Ungar first proposed Mirror API for performing controlled and secure reflection in a paper.[81] The concept was first implemented in Self.
|Батько= |Посада= |Діти= |Дружина= |Мати= Танатар Йосип Ісаакович Народився 29 вересня 1880(1880-09-29)МелітопольПомер 13 грудня 1961(1961-12-13) (81 рік)ДніпропетровськКраїна Російська імперія → УРСРНаціональність караїмДіяльність геолог, викладач університетуAlma mater Національний г�...
Thenay Entidad subnacional ThenayLocalización de Thenay en Francia Coordenadas 46°37′48″N 1°25′44″E / 46.63, 1.4288888888889Entidad Comuna de Francia • País Francia • Región Centro • Departamento Indre • Distrito distrito de Le Blanc • Cantón cantón de Saint-Gaultier • Mancomunidad Communauté de communes Brenne - Val de CreuseAlcalde Monique Mathe(2008-2014)Superficie • Total 34.21 km²Altitud ...
Table tennis at the2020 Summer OlympicsQualificationSinglesmenwomenDoublesmixedTeamsmenwomenvte This article details the qualifying phase for table tennis at the 2020 Summer Olympics (postponed to 2021[1] due to the COVID-19 pandemic). The competition at these Games will comprise a total of 172 table tennis players coming from their respective NOCs; each may enter up to six athletes, two male and two female athletes in singles events, up to one men's and one women's team in team event...
Не плутати з Скіф (стадіон, Львів). Стадіон Сокіл найбільше (трав'яне) поле Сокола Країна Україна Розташування Львів Координати 49°49′23″ пн. ш. 23°57′11″ сх. д. / 49.82306° пн. ш. 23.95306° сх. д. / 49.82306; 23.95306 Побудовано 1950-ті Команда (-и) «Сокіл» «Львів»
Chemical compound This article is about the cannabinoid drug. For the metabotropic glutamate receptor antagonist, see APICA (drug). APICA (synthetic cannabinoid drug)Legal statusLegal status CA: Schedule II DE: Anlage II (Authorized trade only, not prescriptible) UK: Class B Illegal in China and Japan Identifiers IUPAC name N-(1-Adamantyl)-1-pentylindole-3-carboxamide CAS Number1345973-50-3 YPubChem CID71308155ChemSpider29341717UNIIHKU510FH74CompTox Dashboard (EPA)DTXSID80...
O rochedo de Gibraltar, enclave britânico na Espanha, principal objetivo estratégico da Operação Félix. Operação Félix foi o nome de código para uma operação militar planeada pelo Alto-Comando da Alemanha Nazi, durante a Segunda Guerra Mundial, cujo principal objetivo era a ocupação do enclave britânico de Gibraltar, no sul da Península Ibérica. História Após a queda da França em junho de 1940, o Alto-Comando alemão (OKW) elaborou planos para uma operação de limpeza do m...
Cook Up a StormSutradara Raymond Yip Produser Mani Fok Manfred Wong Ditulis oleh Manfred Wong Liu Yi Hana Li SkenarioManfred WongLiu YiHana LiPemeranNicholas TseJung Yong-hwaGe YouTiffany TangMichelle BaiAnthony WongPenata musikAlex SanChan Kwong-wingSinematograferYip Shiu-keiPenyuntingShirley YipYu HongchaoPerusahaanproduksiEmperor Motion PicturesWanda PicturesDistributorEmperor Motion PicturesTanggal rilis 10 Februari 2017 (2017-02-10) Negara Hong Kong Tiongkok Bahasa Kanton Tion...
Cette liste regroupe les guerres et conflits ayant vu la participation de la Grèce. Voici une légende facilitant la lecture de l'issue des guerres ci-dessous : Victoire grecque Défaite grecque Autre résultat (par exemple un traité ou une paix sans un résultat clair, un statu quo ante bellum, un résultat inconnu ou indécis) Conflit en cours Première République hellénique Début Fin Nom du conflit Belligérants Lieu Issue Grèce Ennemis 1821 1830 Guerre d'indépendance grecque R...
This article is missing information about the film's production, theatrical/home media releases, and reception. Please expand the article to include this information. Further details may exist on the talk page. (December 2018) 2004 Filipino filmEbolusyon ng Isang Pamilyang PilipinoDirected byLav DiazWritten byLav DiazProduced byLav DiazPaul TanedoStarringElryan de VeraAngie FerroPen MedinaMarife NecesitoRonnie LazaroLui ManansalaBanaue MiclatCinematographyBahaghari (Richard C. de Guzman)Paul ...
Kamal Nath Kamal Nath (lahir 18 November 1946) adalah seorang politikus India yang menjabat sebagai Ketua Menteri Madhya Pradesh ke-18 selama sekitar 15 bulan dan mengundurkan diri setelah krsis politik. Dia adalah Pemimpin Oposisi di Majelis Legislatif Madhya Pradesh dari Maret 2020 hingga April 2022.[1][2] Referensi ^ Choudhury, Sunetra; Prabhu, Sunil (14 December 2018). Kamal Nath Wins Madhya Pradesh Top Job; Jyotiraditya Scindia On Board. NDTV. Diakses tanggal 8 February 2...
Опис файлу Опис Постер до фільму «Відрубані голови» Джерело Shrunken heads.jpg (англ. вікі) Час створення 1994 Автор зображення Авторські права належать дистриб'ютору, видавцю фільму або художнику цього постера. Ліцензія див. нижче Обґрунтування добропорядного використання для&...
Al-Millionairah al-Saghirahالمليونيرة الصغيرةPoster Al-Millionairah al-SaghirahSutradara Kamal Barakat ProduserDitulis oleh Kamal Barakat PemeranFaten HamamaRushdy AbazaTanggal rilis1948Negara Mesir Bahasa Arab Al-Millionairah al-Saghirah simakⓘ (Arab: المليونيرة الصغيرة, Al-Millionerah al-Ṣāgheerah, The Small Millionaire) adalah sebuah film drama Mesir 1948 yang disutradarai dan ditulis oleh Kamal Barakat. Film tersebut dibintangi oleh Rushdy Abaza ...
Bài viết hoặc đoạn này cần được wiki hóa để đáp ứng tiêu chuẩn quy cách định dạng và văn phong của Wikipedia. Xin hãy giúp sửa bài viết này bằng cách thêm bớt liên kết hoặc cải thiện bố cục và cách trình bày bài. Bài viết này cần thêm chú thích nguồn gốc để kiểm chứng thông tin. Mời bạn giúp hoàn thiện bài viết này bằng cách bổ sung chú thích tới các nguồn đáng tin cậy. Các n�...
Mgr.Raimundo Cesare BergaminS.X.Uskup Emeritus PadangGerejaGereja Katolik RomaKeuskupanPadangPenunjukan16 Oktober 1961(50 tahun, 322 hari)Masa jabatan berakhir17 Maret 1983(72 tahun, 109 hari)PendahuluPascal de Martino, S.X.PenerusMartinus Dogma Situmorang, O.F.M. Cap.ImamatTahbisan imam(1936-04-11)11 April 1936[1](25 tahun, 135 hari)Tahbisan uskup(1962-01-06)6 Januari 1962oleh Albertus Soegijapranata, S.J.(51 tahun, 39 hari)Informasi priba...
Туристичне управління Катару Qatar Tourism Authority Емблема КатаруЗагальна інформаціяКраїна Держава Катарvisitqatar.qa Туристичне управління Катару (араб. الهيئة العامة للسياحة, англ. Qatar Tourism Authority), підрозділ Катарського уряду — це вищий орган, відповідальний за формулювання т...
1996 single by Garth BrooksThe ChangeSingle by Garth Brooksfrom the album Fresh Horses ReleasedMarch 30, 1996GenreCountryLength4:06LabelCapitol NashvilleSongwriter(s)Tony ArataWayne TesterProducer(s)Allen ReynoldsGarth Brooks singles chronology The Beaches of Cheyenne (1995) The Change (1996) It's Midnight Cinderella (1996) The Change is a song written by Tony Arata and Wayne Tester, and recorded by American country music artist Garth Brooks. It was released in March 1996 as the fourth single...
Buddhist monastery in Ladakh, India Diskit MonasteryGaldan Tashi Chuling GompaDiskit MonasteryReligionAffiliationTibetan BuddhismSectGelugpaDeityTsong KhapaFestivalsDesmochheyLocationLocationDiskit, Nubra, Leh, Ladakh, IndiaLocation within IndiaGeographic coordinates34°32′28″N 77°33′37″E / 34.54111°N 77.56028°E / 34.54111; 77.56028ArchitectureStyleTibetan ArchitectureFounderChangzem Tserab ZangpoLocated in Diskit village, the headquarters of Nubra Valley 33...
Canadian ice hockey player Ice hockey player Tyson Sexsmith Sexsmith with the Giants in 2007.Born (1989-03-19) March 19, 1989 (age 34)Priddis, Alberta, CanadaHeight 5 ft 11 in (180 cm)Weight 212 lb (96 kg; 15 st 2 lb)Position GoaltenderCaught LeftPlayed for Worcester SharksKalamazoo WingsStockton ThunderMetallurg NovokuznetskHCB South TyrolNHL Draft 91st overall, 2007San Jose SharksPlaying career 2009–2013 Tyson Sexsmith (born March 19, 1989) is a...
العلاقات الكاميرونية البالاوية الكاميرون بالاو الكاميرون بالاو تعديل مصدري - تعديل العلاقات الكاميرونية البالاوية هي العلاقات الثنائية التي تجمع بين الكاميرون وبالاو.[1][2][3][4][5] مقارنة بين البلدين هذه مقارنة عامة ومرجعية للدولتين: وج...