Advertisement
Guest User

Untitled

a guest
Sep 9th, 2011
31,174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.24 KB | None | 0 0
  1. ---------- Forwarded message ----------
  2. From: Mark S. Miller <[email protected]>
  3. Date: Tue, Nov 16, 2010 at 3:44 PM
  4. Subject: "Future of Javascript" doc from our internal "JavaScript Summit"
  5. last week
  6.  
  7. On November 10th and 11th, a number of Google teams representing a variety
  8. of viewpoints on client-side languages met to agree on a common vision for
  9. the future of Javascript.
  10.  
  11. This document
  12. <
  13. https://docs.google.com/a/google.com/document/d/1aPluaNecjfam8MbF_ewsKRYh55klKM7xXQ8Bf4TCBTc/edit?hl=en
  14.  
  15. is the result. It was first announced on Buzz at
  16. <
  17. http://www.google.com/buzz/a/google.com/komoroske/VxgE3F2yPyg/On-November-10th-and-11th-a-number-of-Google-teams
  18.  
  19. Please forward this message to people and groups that should know about
  20. this. This internal list, [email protected], is the place we
  21. should have the Google-wide discussion of this document and these issues. If
  22. you'd like to join this discussion, please subscribe at <
  23. https://groups.google.com/a/google.com/group/javascript-standard/topics>.
  24.  
  25. Executive Summary
  26.  
  27. Javascript has fundamental flaws that cannot be fixed merely by evolving the
  28. language. We'll adopt a two-pronged strategy for the future of Javascript:
  29.  
  30. - Harmony (low risk/low reward): continue working in conjunction with
  31. TC39 (the EcmaScript standards body) to evolve Javascript
  32. - Dash (high risk/high reward): Develop a new language (called Dash) that
  33. aims to maintain the dynamic nature of Javascript but have a better
  34. performance profile and be amenable to tooling for large projects. Push for
  35. Dash to become an open standard and be adopted by other browsers. Developers
  36. using Dash tooling will be able to use a cross-compiler to target Javascript
  37. for browsers that do not support Dash natively.
  38.  
  39. That’s the 10,000 foot overview. For more detail (including an FAQ), read
  40. on...
  41. ------------------------------
  42.  
  43. Future of Javascript State of affairs Building delightful applications on
  44. the web today is far too difficult. The cyclone of innovation is
  45. increasingly moving off the web onto iOS and other closed platforms.
  46. Javascript has been a part of the web platform since its infancy, but the
  47. web has begun to outgrown it. The web development community has been
  48. backed into using large amounts of JS largely to work around the
  49. deficiencies in the platform. Complex web apps--the kind that Google
  50. specializes in--are struggling against the platform and working with a
  51. language that cannot be tooled and has inherent performance problems. Even
  52. smaller-scale apps written by hobbyist developers have to navigate a
  53. confusing labyrinth of frameworks and incompatible design patterns.
  54.  
  55. The web has succeeded historically to some extent in spite of the web
  56. platform, based primarily on the strength of its reach. The emergence of
  57. compelling alternative platforms like iOS has meant that the web platform
  58. must compete on its merits, not just its reach. Javascript as it exists
  59. today will likely not be a viable solution long-term. Something must
  60. change.
  61. Overview of two-pronged solution
  62. There are two ways to approach the problem: either we can try to evolve
  63. Javascript, or we can push for a new language that addresses core problems
  64. in Javascript that can’t be repaired easily or quickly.
  65.  
  66. The “evolve Javascript” option is relatively low risk, but even in the best
  67. case it will take years and will be limited by fundamental problems in the
  68. language (like the existence of a single Number primitive). Javascript has
  69. historical baggage that cannot be solved without a clean break. Thus,
  70. although it’s low risk, it’s also relatively low reward.
  71.  
  72. The “clean break” option is extremely high risk--it will be a huge challenge
  73. to convince other browser vendors to rally around a new language--but is the
  74. only way to escape the historic problems with Javascript. Thus, its high
  75. risk is matched by the potential for a very high reward--a classic leapfrog
  76. strategy.
  77.  
  78. Pursuing either strategy in isolation is likely to fail. The evolve
  79. Javascript strategy, if executed in isolation, leaves the web in a hobbled
  80. state and unable to compete against the encroachment of other, less open
  81. platforms. The clean break strategy, in isolation, would leave us in an
  82. undesirable situation if it were to fail--Javascript evolution would have
  83. slowed down or evolved in undesirable ways without our support, we would
  84. still have the fundamental flaws, and--worst of all--Google’s leadership
  85. position on the web would be seriously damaged.
  86.  
  87. The only solution is to execute the two strategies in parallel. When the
  88. leapfrog attempt succeeds (that is, it is an open standard and browsers
  89. covering a majority of market share implement it), web programmers will have
  90. a viable and superior alternative to JavaScript.
  91. Harmony: Evolving Javascript
  92. It is paramount that Google continue to maintain a leadership position on
  93. important open web standards such as Harmony. Harmony is the name of the
  94. agreed trajectory of EcmaScript in TC39. Our JS++ project (part of the
  95. larger Parkour project) will join with our Caja project’s efforts to advance
  96. Harmony. Together, we will focus on improving the public Harmony spec and
  97. helping drive it forward at a faster pace in external standard committees
  98. and by leading by example in Chrome wherever possible.
  99.  
  100. In order to help speed up what can be a long and drawn out standardization
  101. process, the internal Harmony effort will experiment using a preprocessor
  102. on top of V8 to prototype features in a way that allows real code to be
  103. written against the proposal. Details of this approach are yet to be
  104. determined. The effort will also work with other browser vendors (e.g.
  105. Mozilla) to get experimental support included, providing further pressure to
  106. get Harmony standardized and widely implemented quickly. Harmony will be
  107. implemented in V8 and JSC (Safari) simultaneously to avoid a WebKit
  108. compatibility gap.
  109.  
  110. Developers who can focus solely on Chrome can expect to be able to see some
  111. Harmony features in Chrome (behind a flag) by the middle of 2011. Developers
  112. focusing on all browsers will have to wait multiple years for direct Harmony
  113. support, due to the relatively slow pace of the standardization process. To
  114. enable Harmony developers to target all earlier browsers, we will enhance
  115. our source-to-source translators (such as Caja’s ES5-to-ES3 translator) to
  116. translate from a large subset of Harmony to earlier versions of JavaScript.
  117.  
  118. Harmony will continue to be evangelized by Google externally as the
  119. evolution of Javascript. The audience for Harmony is developers currently
  120. building on the web platform who wish to write standards-compliant
  121. JavaScript. GWT, JSCompiler, and Caja continue to offer tooling support for
  122. Harmony for those that need it.
  123. Dash: The Clean Break
  124. Dash is the leapfrog effort that is designed to be a clean break from
  125. Javascript. It will seek to keep the parts that have made the Internet so
  126. successful, but fill in holes everyone agrees it has.
  127.  
  128. Dash is designed with three perspectives in mind:
  129.  
  130. - Performance -- Dash is designed with performance characteristics in
  131. mind, so that it is possible to create VMs that do not have the performance
  132. problems that all EcmaScript VMs must have.
  133. - Developer Usability -- Dash is designed to keep the dynamic,
  134. easy-to-get-started, no-compile nature of Javascript that has made the web
  135. platform the clear winner for hobbyist developers.
  136. - Ability to be Tooled -- Dash is designed to be more easily tooled (e.g.
  137. with optional types) for large-scale projects that require
  138. code-comprehension features such as refactoring and finding callsites.
  139. Dash, however, does not require tooling to be effective--small-scale
  140. developers may still be satisfied with a text editor.
  141.  
  142. Dash is also designed to be securable, where that ability does not seriously
  143. conflict with the three main goals.
  144.  
  145. Dash will be designed to be consumed in a number of locations:
  146.  
  147. - Browser VM -- Our aspiration is that Dash will ultimately be a viable
  148. substitute for Javascript as the native client-side language of choice
  149. across all browsers.
  150. - Front-end Server -- Dash will be designed as a language that can be
  151. used server-side for things up to the size of Google-scale Front Ends. This
  152. will allow large scale applications to unify on a single language for client
  153. and front end code.
  154. - Dash Cross Compiler -- Dash will be designed so that a large subset of
  155. it can be compiled to target legacy Javascript platforms so teams that
  156. commit to using Dash do not have to seriously limit their reach. Platforms
  157. that have a Dash VM can operate on the original Dash code without
  158. translation and take advantage of the increased performance. One of the
  159. ways we will evolve Harmony is to be a better target for such compiled Dash
  160. code.
  161.  
  162. The goal of the Dash effort is ultimately to replace JavaScript as the
  163. lingua franca of web development on the open web platform. We will
  164. proactively evangelize Dash with web developers and all other browser
  165. vendors and actively push for its standardization and adoption across the
  166. board. This will be a difficult effort requiring finesse and
  167. determination, but we are committed to doing everything possible to help it
  168. succeed.
  169.  
  170. While Dash is catching on with other browsers, we will promote it as the
  171. language for serious web development on the web platform; the compiler
  172. allows such developers to target other browsers before those browsers
  173. implement Dash.
  174.  
  175. The Dash language effort will be driven by Lars Bak and his team in the
  176. Aarhus office. Bruce Johnson’s team in Atlanta will handle the tooling, and
  177. Pavel Feldman in STP will provide Web Inspector level support for Dash and
  178. Harmony.
  179.  
  180. Dash will be spec complete and have working bits for the browser in Q1 2011.
  181. Developers who can focus solely on Chrome can expect to be able to rely on
  182. some Dash features built into Chrome within a year. Developers focusing on
  183. all browsers will have to make use of the Dash cross compiler to target
  184. other browsers, and, depending on the success of the evangelizing effort,
  185. might have to wait years for other browsers to implement native support for
  186. Dash.
  187.  
  188. Although Dash is in the early stages of development, work is progressing
  189. rapidly. You can learn more about the current proposal in this
  190. presentation<https://docs.google.com/a/google.com/present/view?id=c6b9wv4_27fzwwsddk&revision=_latest&start=0&theme=google&cwj=true>.
  191.  
  192. FAQ Who authored this document?
  193. Brad Abrams, Erik Arvidsson, Lars Bak, Darin Fisher, Dimitri Glazkov, Dan
  194. Grove, Peter Hallam, Bruce Johnson, Alex Komoroske, John Lenz, Kasper Lund,
  195. Mark Miller , Ivan Posva, Alex Russell, and Joel Webber, who collectively
  196. represent TC39 (the EcmaScript standards body), WebKit, Parkour, Brightly,
  197. JSPrime, JS++, Closure, JSCompiler, V8, Dash, Joy, and GWT, among others.
  198.  
  199. What happened to JSPrime?
  200. The JSPrime effort was begun to unify and be a (single!) successor to GWT
  201. and Closure/JSCompiler, suitable for large-scale development inside and
  202. outside Google, including being amenable to IDE-like tools and static
  203. compiler optimizations. The JSPrime team is happily folding its efforts into
  204. Dash now that everyone agrees Dash will explicitly include the same goals.
  205.  
  206. What happened to JS++?
  207. The collection of features under the JS++ umbrella have been folded into
  208. Google efforts around the Harmony Javascript effort. We continue to seek
  209. to improve the Javascript language to allow developers to better take
  210. advantage of our DOM improvements. This is a better plan because it gives
  211. us fewer independent Javascript evolution vectors.
  212.  
  213. What happened to Joy?
  214. The Joy templating and MVC systems are higher-level frameworks that will be
  215. built on top of Dash.
  216.  
  217. Where can I learn more about Dash?
  218. Dash is still in the early stages of development, but work is progressing
  219. rapidly. For an early look at the current proposal, see this
  220. presentation<https://docs.google.com/a/google.com/present/view?id=c6b9wv4_27fzwwsddk&revision=_latest&start=0&theme=google&cwj=true>
  221. .
  222.  
  223. How will Dash interoperate with the huge body of existing JavaScript
  224. (JQuery, Analytics, etc)
  225. Moving to a new language will be a very large undertaking. The specifics of
  226. how inter-operation with current Javascript would work is still an open
  227. question.
  228.  
  229. What about the existing code bases for large Google Apps? Won’t they have
  230. to rebuild everything to take advantage of Dash?
  231. The Dash Cross Compiler should be capable of taking typed Closure code (with
  232. some restrictions) and converting to Dash. Although the migration process
  233. won’t be fully automatic, it should make moving over to a Dash codebase
  234. somewhat easier.
  235.  
  236. How does this affect Web Inspector?
  237. Web inspector will continue to support Javascript including any new features
  238. of Harmony that we add to chrome.
  239.  
  240. How does this affect our cloud IDE (Brightly)?
  241. Brightly will enable building any web application in V1 using today’s
  242. Javascript plus the additions in Harmony. As soon as it is ready, Brightly
  243. will support Dash as well. We expect that the more prescriptive development
  244. aspects of Brightly that will come on line in the future will be more Dash
  245. focused.
  246.  
  247. We expect Brightly itself to be the first application written in Dash.
  248.  
  249. How will we get Harmony related changes into Chrome?
  250. Very carefully ;-). V8 is carefully tuned for speed with the current
  251. Javascript standard rather than flexibility--this makes it very difficult to
  252. make experimental changes. We are considering pre-processors and a number
  253. of other options, but ultimately the precise solution is still an open
  254. question.
  255.  
  256. What about Go?
  257. Go is a very promising systems-programming language in the vein of C++. We
  258. fully hope and expect that Go becomes the standard back-end language at
  259. Google over the next few years. Dash is focused on client (and eventually
  260. Front-end server development). The needs there are different (flexibility
  261. vs. stability) and therefore a different programming language is warranted.
  262.  
  263. Will Dash run on the Server? Android?
  264. Yes, but short term we are focused on the client.
  265.  
  266. Does Dash replace Java?
  267. For many projects that will be a viable option but it requires significant
  268. engineering effort on Dash tooling and an extensive set of libraries.
  269.  
  270. Is Dash statically typed and toolable?
  271. Dash is optionally-typed and with judicious use of types is as toolable as
  272. Java. This enables “grown up” developer tools such as code-refactoring,
  273. while still allowing small-scale or experimental projects the flexibility
  274. that dynamism provides.
  275.  
  276. What is the future of the JSCompiler and GWT?
  277. JSCompiler and GWT were already on a merger path. This effort gives us a
  278. direction for that unification around the Dash language. We will actively
  279. support teams for a long time on the current generation of JSCompiler and
  280. GWT and provide fantastic co-existence and migration tools to Dash.
  281.  
  282. Why are you killing Javascript?
  283. We are not! Google has a huge interest in keeping the evolution of
  284. Javascript on track. In fact, our investment in TC39 (the Javascript
  285. standards body) will likely increase somewhat, and we will continue to
  286. honestly and whole-heartedly improve the language within the constraints.
  287.  
  288. What are the time frames?
  289. The Dash VM and Dash Cross Compiler will be developed in parallel with the
  290. language specification, and so should be available not long after the spec
  291. is settled (likely in early 2011). However, the initial versions will not
  292. be heavily optimized (and thus not necessarily ready for production apps)
  293. until later (likely later 2011).
  294.  
  295. Experimental Harmony features will begin showing up in Chrome (behind a
  296. flag) by midway through 2011, and will later be implemented simultaneously
  297. in V8 and JSC (Safari’s Javascript engine) to avoid a WebKit compatibility
  298. gap.
  299.  
  300. Why do you have two projects? Why not just one?
  301. See the section above about why we’re pursuing a two-pronged strategy.
  302.  
  303. What will Google developers be using?
  304. We will strongly encourage Google developers start off targeting Chrome-only
  305. whenever possible as this gives us the best end user experience. However,
  306. for some apps this will not make sense, so we are building a compiler for
  307. Dash that targets Javascript (ES3). We intend for existing Google teams
  308. using GWT and JSCompiler to eventually migrate to the Dash compiler.
  309.  
  310. What if other browsers don’t follow us with Dash?
  311. Lars has promised to “sweet talk” the other browser vendors and, while we
  312. are all eager to see this, we recognize this is a very difficult road. Our
  313. approach is to make an absolutely fantastic VM/Language and development
  314. environment and build great apps that fully leverage it in order to help
  315. other browsers see the wisdom in following. Once Dash has had a chance to
  316. prove its stability and feasibility, we are committed to making Dash an open
  317. standard with involvement from the broader web community.
  318.  
  319. However, in the event that other browsers don’t follow, Dash can still be a
  320. success. Developers that target only Chrome can rely on the Dash VM, and
  321. developers that target other browsers as well can still make use of the Dash
  322. compiler. In this event, the wider web will be stuck with Javascript as the
  323. standard language--and that’s precisely why we must continue investing in
  324. evolving Javascript.
  325.  
  326. Why are you circumventing the standards process?
  327. We fully intend to cooperate fully with standards processes--the problem is
  328. that the current standard processes are limited to Javascript, which is not
  329. viable in the long term. Any effort with the historic baggage that
  330. Javascript has will be extremely limited. We need to make a clean break,
  331. make progress, and then engage the community.
  332.  
  333. What will we say at Google IO about Dash/Harmony?
  334. Google deeply cares about the web. We care about making the web
  335. incrementally better today (Harmony) as well as making it substantially
  336. better in the future (Dash). Large scale applications should probably build
  337. on Dash; smaller-scale developers might want to stick with Harmony until the
  338. Dash standard gains ubiquity. Given that Dash is such a big bet we are
  339. likely to spend much more time at IO on Dash, though of course we will spend
  340. some time on the leadership position Google is taking in Harmony.
  341.  
  342. --
  343. Cheers,
  344. --MarkM
  345.  
  346. --
  347. Cheers,
  348. --MarkM
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement